include the current date in the updates to docHistoryStats

This commit is contained in:
Brian Gough 2015-05-26 11:00:55 +01:00
parent bbbe2077f0
commit 66bca8d05c

View file

@ -37,7 +37,10 @@ module.exports = MongoManager =
async.series jobs, (err, results) ->
if not temporary
# keep track of updates to be packed
db.docHistoryStats.update {doc_id:ObjectId(doc_id)}, {$inc:{updates:updates.length}}, {upsert:true}, () ->
db.docHistoryStats.update {doc_id:ObjectId(doc_id)}, {
$inc:{update_count:updates.length},
$currentDate:{last_update:true}
}, {upsert:true}, () ->
callback(err,results)
else
callback(err,results)