log number of updates for future debugging

This commit is contained in:
Brian Gough 2017-05-12 14:07:59 +01:00
parent d4a8d88750
commit be96548199

View file

@ -40,6 +40,7 @@ module.exports = UpdateManager =
fetchAndApplyUpdates: (project_id, doc_id, callback = (error) ->) -> fetchAndApplyUpdates: (project_id, doc_id, callback = (error) ->) ->
RealTimeRedisManager.getPendingUpdatesForDoc doc_id, (error, updates) => RealTimeRedisManager.getPendingUpdatesForDoc doc_id, (error, updates) =>
return callback(error) if error? return callback(error) if error?
logger.log {project_id: project_id, doc_id: doc_id, count: updates.length}, "processing updates"
if updates.length == 0 if updates.length == 0
return callback() return callback()
async.eachSeries updates, async.eachSeries updates,