mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 21:05:55 +01:00
electron fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const scriptService = require('./script');
|
||||
const repository = require('./repository');
|
||||
const cls = require('./cls');
|
||||
const sqlInit = require('./sql_init');
|
||||
|
||||
async function runNotesWithLabel(runAttrValue) {
|
||||
const notes = await repository.getEntities(`
|
||||
@@ -19,8 +20,10 @@ async function runNotesWithLabel(runAttrValue) {
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(cls.wrap(() => runNotesWithLabel('backendStartup')), 10 * 1000);
|
||||
sqlInit.dbReady.then(() => {
|
||||
setTimeout(cls.wrap(() => runNotesWithLabel('backendStartup')), 10 * 1000);
|
||||
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('hourly')), 3600 * 1000);
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('hourly')), 3600 * 1000);
|
||||
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('daily')), 24 * 3600 * 1000);
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('daily')), 24 * 3600 * 1000);
|
||||
});
|
||||
Reference in New Issue
Block a user