mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:01:52 +00:00
use gauge not inc
This commit is contained in:
parent
584cd71173
commit
adc90b68e7
2 changed files with 4 additions and 2 deletions
|
@ -62,7 +62,7 @@ module.exports = LockManager =
|
|||
LockManager._tryLock key, namespace, (error, gotLock) ->
|
||||
return callback(error) if error?
|
||||
if gotLock
|
||||
metrics.inc "lock.#{namespace}.get.success.tries", attempts
|
||||
metrics.gauge "lock.#{namespace}.get.success.tries", attempts
|
||||
callback(null)
|
||||
else
|
||||
setTimeout attempt, LockManager.LOCK_TEST_INTERVAL
|
||||
|
|
|
@ -13,7 +13,9 @@ describe 'LockManager - getting the lock', ->
|
|||
client: ()->
|
||||
auth:->
|
||||
"settings-sharelatex":{redis:{}}
|
||||
"metrics-sharelatex": inc:->
|
||||
"metrics-sharelatex":
|
||||
inc:->
|
||||
gauge:->
|
||||
|
||||
@callback = sinon.stub()
|
||||
@key = "lock:web:lockName:project-id}"
|
||||
|
|
Loading…
Reference in a new issue