Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
fix: should not check sync status on exist mode
Browse files Browse the repository at this point in the history
closes #858
  • Loading branch information
fengmk2 committed Apr 4, 2016
1 parent 0329cfa commit be0d8ae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sync/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ function* checkSyncStatus() {
var lastSyncTime;
if (config.syncModel === 'all') {
lastSyncTime = total.last_sync_time;
} else if (config.syncModel === 'exist') {
lastSyncTime = total.last_exist_sync_time;
}
debug('checkSyncStatus start, lastSyncTime: %s, syncInterval: %s', lastSyncTime, syncInterval);
if (!lastSyncTime) {
Expand All @@ -197,7 +195,7 @@ function* checkSyncStatus() {
var oneDay = 3600000 * 24;
if (diff > oneDay) {
var err = new Error('Last sync time is expired in ' + diff + ' ms, lastSyncTime: ' + new Date(lastSyncTime));
err.name = 'SyncExpriedError';
err.name = 'SyncExpiredError';
sendMailToAdmin(err, null, new Date());
}
}

0 comments on commit be0d8ae

Please sign in to comment.