mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
add metric for pendingUpdates queue
This commit is contained in:
parent
d4d7f4ed68
commit
5c28da1031
2 changed files with 4 additions and 0 deletions
|
@ -72,6 +72,9 @@ module.exports = DocumentUpdaterManager =
|
|||
error.updateSize = updateSize
|
||||
return callback(error)
|
||||
|
||||
# record metric for each update added to queue
|
||||
metrics.summary 'redis.pendingUpdates', updateSize, {status: 'push'}
|
||||
|
||||
doc_key = "#{project_id}:#{doc_id}"
|
||||
# Push onto pendingUpdates for doc_id first, because once the doc updater
|
||||
# gets an entry on pending-updates-list, it starts processing.
|
||||
|
|
|
@ -25,6 +25,7 @@ describe 'DocumentUpdaterManager', ->
|
|||
'request': @request = {}
|
||||
'redis-sharelatex' : createClient: () => @rclient
|
||||
'metrics-sharelatex': @Metrics =
|
||||
summary: sinon.stub()
|
||||
Timer: class Timer
|
||||
done: () ->
|
||||
globals:
|
||||
|
|
Loading…
Reference in a new issue