mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(log): cyclic dependency to options breaking tests
This commit is contained in:
parent
54efa6b38c
commit
7a036fc777
@ -6,7 +6,6 @@ import path from "path";
|
||||
import { EOL } from "os";
|
||||
import dataDir from "./data_dir.js";
|
||||
import cls from "./cls.js";
|
||||
import optionService from "./options.js";
|
||||
|
||||
if (!fs.existsSync(dataDir.LOG_DIR)) {
|
||||
fs.mkdirSync(dataDir.LOG_DIR, 0o700);
|
||||
@ -44,6 +43,7 @@ async function cleanupOldLogFiles() {
|
||||
retentionDays = parsed;
|
||||
}
|
||||
} else {
|
||||
const optionService = (await import("./options.js")).default;
|
||||
retentionDays = optionService.getOptionInt("logRetentionDays", DEFAULT_RETENTION_DAYS);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user