Try to fix when server have heavy loading cache might not update to db properly
This commit is contained in:
@@ -27,10 +27,10 @@ var updater = setInterval(function () {
|
||||
if (cache.isDirty) {
|
||||
if (config.debug) logger.info("history updater found dirty history: " + key);
|
||||
var history = parseHistoryToArray(cache.history);
|
||||
cache.isDirty = false;
|
||||
finishUpdateHistory(key, history, function (err, count) {
|
||||
if (err) return callback(err, null);
|
||||
if (!count) return callback(null, null);
|
||||
cache.isDirty = false;
|
||||
cache.updateAt = Date.now();
|
||||
return callback(null, null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user