mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix postponed deletion job - need to have cls
This commit is contained in:
parent
2f887f1ea7
commit
a8e13eac3a
@ -5,6 +5,7 @@ const syncTableService = require('./sync_table');
|
||||
const attributeService = require('./attributes');
|
||||
const eventService = require('./events');
|
||||
const repository = require('./repository');
|
||||
const cls = require('../services/cls');
|
||||
const Note = require('../entities/note');
|
||||
const NoteImage = require('../entities/note_image');
|
||||
const NoteRevision = require('../entities/note_revision');
|
||||
@ -322,9 +323,9 @@ async function cleanupDeletedNotes() {
|
||||
}
|
||||
|
||||
// first cleanup kickoff 5 minutes after startup
|
||||
setTimeout(cleanupDeletedNotes, 5 * 60 * 1000);
|
||||
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
|
||||
|
||||
setInterval(cleanupDeletedNotes, 4 * 3600 * 1000);
|
||||
setInterval(cls.wrap(cleanupDeletedNotes), 4 * 3600 * 1000);
|
||||
|
||||
module.exports = {
|
||||
createNewNote,
|
||||
|
Loading…
x
Reference in New Issue
Block a user