mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
added sync mutex for consistency checks and backup
This commit is contained in:
8
services/sync_mutex.js
Normal file
8
services/sync_mutex.js
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Sync makes process can make data intermittently inconsistent. Processes which require strong data consistency
|
||||
* (like consistency checks) can use this mutex to make sure sync isn't currently running.
|
||||
*/
|
||||
|
||||
const Mutex = require('async-mutex').Mutex;
|
||||
|
||||
module.exports = new Mutex();
|
||||
Reference in New Issue
Block a user