mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add random jitter to cutoff time
This commit is contained in:
parent
a32495d2b4
commit
2c22a60052
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ async = require "async"
|
|||
module.exports = DeleteQueueManager =
|
||||
flushAndDeleteOldProjects: (options, callback) ->
|
||||
startTime = Date.now()
|
||||
cutoffTime = startTime - options.min_delete_age
|
||||
cutoffTime = startTime - options.min_delete_age + 100 * (Math.random() - 0.5)
|
||||
count = 0
|
||||
|
||||
flushProjectIfNotModified = (project_id, flushTimestamp, cb) ->
|
||||
|
|
Loading…
Reference in a new issue