diff --git a/services/build.js b/services/build.js index 57ec06e03..f4d0bcd9d 100644 --- a/services/build.js +++ b/services/build.js @@ -1 +1 @@ -module.exports = { build_date:"2017-12-16T09:02:14-05:00", build_revision: "4381d885243568fe5d4c60dce36bf0c2f98507fe" }; +module.exports = { build_date:"2017-12-16T12:22:45-05:00", build_revision: "0c0e95b91e6d42c9aaf7921d83630ab36a41e0ae" }; diff --git a/services/sync.js b/services/sync.js index 96dbb76e0..f09e4147b 100644 --- a/services/sync.js +++ b/services/sync.js @@ -243,6 +243,14 @@ async function sendEntity(syncContext, entity, entityName) { } async function checkContentHash(syncContext) { + const resp = await syncRequest(syncContext, 'GET', '/api/sync/check'); + + if (await getLastSyncedPull() < resp.max_sync_id) { + log.info("There are some outstanding pulls, skipping content check."); + + return; + } + const lastSyncedPush = await getLastSyncedPush(); const notPushedSyncs = await sql.getSingleValue("SELECT COUNT(*) FROM sync WHERE id > ?", [lastSyncedPush]); @@ -252,14 +260,6 @@ async function checkContentHash(syncContext) { return; } - const resp = await syncRequest(syncContext, 'GET', '/api/sync/check'); - - if (await getLastSyncedPull() < resp.max_sync_id) { - log.info("There are some outstanding pulls, skipping content check."); - - return; - } - const hashes = await content_hash.getHashes(); let allChecksPassed = true;