diff --git a/services/document-updater/app/coffee/DeleteQueueManager.coffee b/services/document-updater/app/coffee/DeleteQueueManager.coffee index 835f718615..3c8af6cd84 100644 --- a/services/document-updater/app/coffee/DeleteQueueManager.coffee +++ b/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() diff --git a/services/document-updater/app/coffee/ProjectManager.coffee b/services/document-updater/app/coffee/ProjectManager.coffee index ca077ff60b..0d57687668 100644 --- a/services/document-updater/app/coffee/ProjectManager.coffee +++ b/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)