Keep incomplete Fast Setup isolated

This commit is contained in:
vorotamoroz
2026-08-07 08:27:04 +00:00
parent a9e64860d5
commit 15abe344bb
5 changed files with 385 additions and 21 deletions
+4 -7
View File
@@ -10,11 +10,7 @@ import {
synchroniseAllFilesBetweenDBandStorage,
type FullScanOptions,
} from "@vrtmrz/livesync-commonlib/compat/serviceFeatures/offlineScanner";
import {
adjustSettingToRemoteIfNeeded,
cancelScheduledInitialisation,
processVaultInitialisation,
} from "./redFlag";
import { adjustSettingToRemoteIfNeeded, cancelScheduledInitialisation, processVaultInitialisation } from "./redFlag";
export const SIMPLE_FETCH_STAGE1_REMOTE_WINS = "Overwrite all with remote files";
export const SIMPLE_FETCH_STAGE1_NEWER_WINS = "Compare time and take newer";
@@ -217,7 +213,7 @@ export async function askAndPerformFastSetupOnScheduledFetchAll(
return await cancelScheduledInitialisation(host, cleanupFlag);
}
return await processVaultInitialisation(host, log, async () => {
const performFastSetup = async () => {
// 1. Perform fast DB fetch (download remote DB content to local DB)
await host.serviceModules.rebuilder.$fetchLocalDBFast(false);
@@ -253,5 +249,6 @@ export async function askAndPerformFastSetupOnScheduledFetchAll(
clearRememberedSimpleFetchMode(host);
log("Simple fetch and scan operation completed.", LOG_LEVEL_NOTICE);
return true;
});
};
return await processVaultInitialisation(host, log, performFastSetup, "keep-on-failure");
}