mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #91 from overleaf/bg-fix-multi-getdoctimestamps
fix getDocTimestamps for multiple docs
This commit is contained in:
commit
f172650601
1 changed files with 4 additions and 4 deletions
|
@ -4,6 +4,7 @@ logger = require('logger-sharelatex')
|
|||
metrics = require('./Metrics')
|
||||
Errors = require "./Errors"
|
||||
crypto = require "crypto"
|
||||
async = require "async"
|
||||
ProjectHistoryRedisManager = require "./ProjectHistoryRedisManager"
|
||||
|
||||
# Sometimes Redis calls take an unexpectedly long time. We have to be
|
||||
|
@ -289,10 +290,9 @@ module.exports = RedisManager =
|
|||
|
||||
getDocTimestamps: (doc_ids, callback = (error, result) ->) ->
|
||||
# get lastupdatedat timestamps for an array of doc_ids
|
||||
multi = rclient.multi()
|
||||
for doc_id in doc_ids
|
||||
multi.get keys.lastUpdatedAt(doc_id: doc_id)
|
||||
multi.exec callback
|
||||
async.mapSeries doc_ids, (doc_id, cb) ->
|
||||
rclient.get keys.lastUpdatedAt(doc_id: doc_id), cb
|
||||
, callback
|
||||
|
||||
queueFlushAndDeleteProject: (project_id, callback) ->
|
||||
# store the project id in a sorted set ordered by time
|
||||
|
|
Loading…
Reference in a new issue