mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
distinguishing between when DB is just connected and when it's ready for queries (validated)
This commit is contained in:
@@ -58,10 +58,12 @@ if (!fs.existsSync(dataDir.BACKUP_DIR)) {
|
||||
fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
|
||||
}
|
||||
|
||||
setInterval(regularBackup, 60 * 60 * 1000);
|
||||
sql.dbReady.then(() => {
|
||||
setInterval(regularBackup, 60 * 60 * 1000);
|
||||
|
||||
// kickoff backup immediately
|
||||
setTimeout(regularBackup, 1000);
|
||||
// kickoff backup immediately
|
||||
setTimeout(regularBackup, 1000);
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
backupNow
|
||||
|
||||
Reference in New Issue
Block a user