Brian Gough 7 лет назад
Родитель
Сommit
eae4b352ca

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

@@ -31,7 +31,7 @@ module.exports = DeleteQueueManager =
                     logger.log {project_id}, "skipping flush of queued project - no timestamps"
                     return cb()
                 # are any of the timestamps newer than the time the project was flushed?
-                for timestamp in timestamps or [] when timestamp > flushTimestamp
+                for timestamp in timestamps when timestamp > flushTimestamp
                     metrics.inc "queued-delete-skipped"
                     logger.debug {project_id, timestamps, flushTimestamp}, "found newer timestamp, will skip delete"
                     return cb()

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

@@ -83,7 +83,7 @@ module.exports = ProjectManager =
 	getProjectDocsTimestamps: (project_id, callback = (error) ->) ->
 		RedisManager.getDocIdsInProject project_id, (error, doc_ids) ->
 			return callback(error) if error?
-			return callback() if !doc_ids?.length
+			return callback(null, []) if !doc_ids?.length
 			RedisManager.getDocTimestamps doc_ids, (error, timestamps) ->
 				return callback(error) if error?
 				callback(null, timestamps)