mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
separate DB connection for each transaction (just for the record, will be reverted probably)
This commit is contained in:
@@ -16,7 +16,9 @@ async function deleteOld() {
|
||||
const cutoffId = await sql.getSingleValue("SELECT id FROM event_log ORDER BY id DESC LIMIT 1000, 1");
|
||||
|
||||
if (cutoffId) {
|
||||
await sql.execute("DELETE FROM event_log WHERE id < ?", [cutoffId]);
|
||||
await sql.doInTransaction(async db => {
|
||||
await sql.execute(db, "DELETE FROM event_log WHERE id < ?", [cutoffId]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user