mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-25 16:33:22 +00:00
Merge pull request #125 from overleaf/bg-add-queue-metrics
add metric for pendingUpdates queue
This commit is contained in:
commit
f4b17ebbad
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…
Add table
Reference in a new issue