mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-31 14:31:48 +00:00
Monitor get document times
This commit is contained in:
parent
42e7d5d4b6
commit
d79793c34f
1 changed files with 3 additions and 3 deletions
|
@ -7,11 +7,11 @@ rclient = redis.createClient(settings.redis.web)
|
|||
|
||||
module.exports = DocumentUpdaterManager =
|
||||
getDocument: (project_id, doc_id, fromVersion, callback = (error, exists, doclines, version) ->) ->
|
||||
#timer = new metrics.Timer("get-document")
|
||||
timer = new metrics.Timer("get-document")
|
||||
url = "#{settings.apis.documentupdater.url}/project/#{project_id}/doc/#{doc_id}?fromVersion=#{fromVersion}"
|
||||
logger.log {project_id, doc_id, fromVersion}, "getting doc from document updater"
|
||||
request.get url, (err, res, body) ->
|
||||
#timer.done()
|
||||
timer.done()
|
||||
if err?
|
||||
logger.error {err, url, project_id, doc_id}, "error getting doc from doc updater"
|
||||
return callback(err)
|
||||
|
@ -55,4 +55,4 @@ module.exports = DocumentUpdaterManager =
|
|||
multi.rpush "pending-updates-list", doc_key
|
||||
multi.exec (error) ->
|
||||
return callback(error) if error?
|
||||
callback()
|
||||
callback()
|
||||
|
|
Loading…
Reference in a new issue