add comment about background flush limit

This commit is contained in:
Brian Gough 2019-10-01 15:06:01 +01:00
parent ae3ebf2db6
commit 0c14b7d2f8

View file

@ -70,6 +70,10 @@ module.exports = DeleteQueueManager =
if Settings.shuttingDown
logger.warn "discontinuing background flush due to shutdown"
return
DeleteQueueManager.flushAndDeleteOldProjects {timeout:1000,min_delete_age:3*60*1000,limit:1000}, (err, flushed) ->
DeleteQueueManager.flushAndDeleteOldProjects {
timeout:1000,
min_delete_age:3*60*1000,
limit:1000 # high value, to ensure we always flush enough projects
}, (err, flushed) ->
setTimeout doFlush, (if flushed > 10 then SHORT_DELAY else LONG_DELAY)
doFlush()