fix DB setup

This commit is contained in:
zadam
2020-06-20 21:42:41 +02:00
parent 6207203b35
commit 027afab6b1
19 changed files with 133 additions and 118 deletions

View File

@@ -368,12 +368,14 @@ function getMaxSyncId() {
return sql.getValue('SELECT MAX(id) FROM sync');
}
setInterval(cls.wrap(sync), 60000);
sqlInit.dbReady.then(() => {
setInterval(cls.wrap(sync), 60000);
// kickoff initial sync immediately
setTimeout(cls.wrap(sync), 3000);
// kickoff initial sync immediately
setTimeout(cls.wrap(sync), 3000);
setInterval(cls.wrap(updatePushStats), 1000);
setInterval(cls.wrap(updatePushStats), 1000);
});
module.exports = {
sync,