diff options
author | Wu Cheng-Han | 2016-12-18 22:52:30 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-12-18 22:52:30 +0800 |
commit | 62eccd48e591fac2774032330ee03a2e60df00b5 (patch) | |
tree | fd75cdec5f48ad2802c2210c559fc9a50384745e /lib/realtime.js | |
parent | be3aa3bfd50859ca8a310130a99f977fa7537246 (diff) |
Try to fix when server have heavy loading cache might not update to db properly
Diffstat (limited to 'lib/realtime.js')
-rw-r--r-- | lib/realtime.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/realtime.js b/lib/realtime.js index 0b9e0c77..ed36a24f 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -84,6 +84,7 @@ var updater = setInterval(function () { var note = notes[key]; if (note.server.isDirty) { if (config.debug) logger.info("updater found dirty note: " + key); + note.server.isDirty = false; updateNote(note, function(err, _note) { // handle when note already been clean up if (!notes[key] || !notes[key].server) return callback(null, null); @@ -104,7 +105,6 @@ var updater = setInterval(function () { } return callback(err, null); } - note.server.isDirty = false; note.updatetime = moment(_note.lastchangeAt).valueOf(); emitCheck(note); return callback(null, null); |