From 0c14b7d2f8b98ceeb7cf4585bf7b714b06cf9249 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 1 Oct 2019 15:06:01 +0100 Subject: [PATCH] add comment about background flush limit --- .../document-updater/app/coffee/DeleteQueueManager.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/document-updater/app/coffee/DeleteQueueManager.coffee b/services/document-updater/app/coffee/DeleteQueueManager.coffee index 8cd4a66c21..985222df69 100644 --- a/services/document-updater/app/coffee/DeleteQueueManager.coffee +++ b/services/document-updater/app/coffee/DeleteQueueManager.coffee @@ -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()