mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(docs-edit): concurrency issue between import & export
This commit is contained in:
parent
09cb1eb5de
commit
eba4c1a545
@ -11,6 +11,7 @@ import { extractZip, initializeDatabase, startElectron } from "./electron-utils.
|
||||
import cls from "./src/services/cls.js";
|
||||
import type { AdvancedExportOptions } from "./src/services/export/zip.js";
|
||||
import TaskContext from "./src/services/task_context.js";
|
||||
import { deferred } from "./src/services/utils.js";
|
||||
|
||||
const NOTE_ID_USER_GUIDE = "pOsGYCXsbNQG";
|
||||
const NOTE_ID_RELEASE_NOTES = "hD3V4hiu2VW4";
|
||||
@ -22,12 +23,15 @@ async function main() {
|
||||
await initializeTranslations();
|
||||
await initializeDatabase(true);
|
||||
|
||||
const initializedPromise = deferred<void>();
|
||||
cls.init(async () => {
|
||||
await importData(markdownPath);
|
||||
await importData(releaseNotesPath);
|
||||
setOptions();
|
||||
initializedPromise.resolve();
|
||||
});
|
||||
|
||||
await initializedPromise;
|
||||
await startElectron();
|
||||
|
||||
// Wait for the import to be finished and the application to be loaded before we listen to changes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user