mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
added basic CLS support with re-entrant transactions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const script = require('./script');
|
||||
const Repository = require('./repository');
|
||||
const cls = require('./cls');
|
||||
|
||||
const repo = new Repository();
|
||||
|
||||
@@ -20,8 +21,8 @@ async function runNotesWithLabel(runAttrValue) {
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(() => runNotesWithLabel('backend_startup'), 10 * 1000);
|
||||
setTimeout(cls.wrap(() => runNotesWithLabel('backend_startup')), 10 * 1000);
|
||||
|
||||
setInterval(() => runNotesWithLabel('hourly'), 3600 * 1000);
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('hourly')), 3600 * 1000);
|
||||
|
||||
setInterval(() => runNotesWithLabel('daily'), 24 * 3600 * 1000);
|
||||
setInterval(cls.wrap(() => runNotesWithLabel('daily'), 24 * 3600 * 1000));
|
||||
Reference in New Issue
Block a user