mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 00:40:48 +00:00
remove unnecessary check
This commit is contained in:
parent
9f358ead9f
commit
eae4b352ca
2 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue