Skip to content

Commit

Permalink
fix: save sync last time when successes > 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Mar 15, 2018
1 parent e8f6665 commit 6f656a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sync/sync_all.js
Expand Up @@ -66,8 +66,9 @@ module.exports = function* sync() {

logger.syncInfo('All packages sync done, successes %d, fails %d, updates %d',
worker.successes.length, worker.fails.length, worker.updates.length);
//only when all succss, set last sync time
if (!worker.fails.length) {
// only when all succss, set last sync time
// or successes > 1000
if (!worker.fails.length || worker.successes.length > 1000) {
yield totalService.setLastSyncTime(syncTime);
}
return {
Expand Down

0 comments on commit 6f656a0

Please sign in to comment.