mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-29 06:47:06 +00:00
Keep incomplete Fast Setup isolated
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user