Просмотр исходного кода

for simplicity keep the cutoff time the same while flushing the queue

Brian Gough 7 лет назад
Родитель
Сommit
a709a0adaa
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/document-updater/app/coffee/DeleteQueueManager.coffee

+ 1 - 1
services/document-updater/app/coffee/DeleteQueueManager.coffee

@@ -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?