mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
for simplicity keep the cutoff time the same while flushing the queue
This commit is contained in:
parent
eae4b352ca
commit
a709a0adaa
1 changed files with 1 additions and 1 deletions
|
@ -22,6 +22,7 @@ async = require "async"
|
|||
module.exports = DeleteQueueManager =
|
||||
flushAndDeleteOldProjects: (options, callback) ->
|
||||
startTime = Date.now()
|
||||
cutoffTime = startTime - options.min_delete_age
|
||||
count = 0
|
||||
|
||||
flushProjectIfNotModified = (project_id, flushTimestamp, cb) ->
|
||||
|
@ -49,7 +50,6 @@ module.exports = DeleteQueueManager =
|
|||
if count > options.limit
|
||||
logger.log "hit count limit on flushing old projects"
|
||||
return callback()
|
||||
cutoffTime = now - options.min_delete_age
|
||||
RedisManager.getNextProjectToFlushAndDelete cutoffTime, (err, project_id, flushTimestamp, queueLength) ->
|
||||
return callback(err) if err?
|
||||
return callback() if !project_id?
|
||||
|
|
Loading…
Reference in a new issue