sql_init/migration fixes

This commit is contained in:
zadam
2020-07-02 22:57:17 +02:00
parent c4cc48dfc9
commit 18749092ff
9 changed files with 51 additions and 93 deletions

View File

@@ -99,14 +99,8 @@ if (!fs.existsSync(dataDir.BACKUP_DIR)) {
fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
}
sqlInit.dbReady.then(() => {
setInterval(cls.wrap(regularBackup), 4 * 60 * 60 * 1000);
// kickoff first backup soon after start up
setTimeout(cls.wrap(regularBackup), 5 * 60 * 1000);
});
module.exports = {
backupNow,
anonymize
anonymize,
regularBackup
};