mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-05 12:42:04 +08:00
fix(edit-docs): fix random erase of attachments due to consistency issues
This commit is contained in:
parent
3a16bf59ef
commit
65d017390e
@ -28,9 +28,9 @@ async function main() {
|
||||
|
||||
async function setOptions() {
|
||||
const optionsService = (await import("./src/services/options.js")).default;
|
||||
optionsService.setOption("eraseUnusedAttachmentsAfterSeconds", 600);
|
||||
optionsService.setOption("eraseUnusedAttachmentsAfterSeconds", 10);
|
||||
optionsService.setOption("eraseUnusedAttachmentsAfterTimeScale", 60);
|
||||
optionsService.setOption("compressImages", false);
|
||||
optionsService.setOption("compressImages", "false");
|
||||
}
|
||||
|
||||
async function createImportZip() {
|
||||
|
@ -3,13 +3,15 @@ import fs from "fs/promises";
|
||||
import fsExtra from "fs-extra";
|
||||
import path from "path";
|
||||
|
||||
export async function initializeDatabase(customDbBuffer?: Buffer) {
|
||||
const sqlInit = (await import("./src/services/sql_init.js")).default;
|
||||
|
||||
cls.init(() => {
|
||||
if (!sqlInit.isDbInitialized()) {
|
||||
sqlInit.createInitialDatabase(true, customDbBuffer);
|
||||
}
|
||||
export function initializeDatabase(customDbBuffer?: Buffer) {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
const sqlInit = (await import("./src/services/sql_init.js")).default;
|
||||
cls.init(async () => {
|
||||
if (!sqlInit.isDbInitialized()) {
|
||||
await sqlInit.createInitialDatabase(true, customDbBuffer);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user