#98, sync is now configured in the options

This commit is contained in:
azivner
2018-07-22 22:21:16 +02:00
parent 073300bbcd
commit e7460ca3a9
15 changed files with 115 additions and 46 deletions

View File

@@ -54,7 +54,7 @@ async function addEntitySync(entityName, entityId, sourceId) {
sourceId: sourceId || cls.getSourceId() || sourceIdService.getCurrentSourceId()
});
if (!syncSetup.isSyncSetup) {
if (!await syncSetup.isSyncSetup()) {
// this is because the "server" instances shouldn't have outstanding pushes
// useful when you fork the DB for new "client" instance, it won't try to sync the whole DB
await sql.execute("UPDATE options SET value = (SELECT MAX(id) FROM sync) WHERE name IN('lastSyncedPush', 'lastSyncedPull')");