mark temporary packs with a last_checked date in the far future

they do not need to be checked for archiving
This commit is contained in:
Brian Gough 2016-04-06 14:29:49 +01:00
parent 08fc151eee
commit 0b9a0730c0

View file

@ -95,6 +95,7 @@ module.exports = PackManager =
temporary: temporary
if temporary
newPack.expiresAt = new Date(Date.now() + 7 * DAYS)
newPack.last_checked = new Date(Date.now() + 30 * DAYS) # never check temporary packs
logger.log {project_id, doc_id, newUpdates}, "inserting updates into new pack"
db.docHistory.save newPack, (err, result) ->
return callback(err) if err?