Browse Source

Merge pull request #50 from sharelatex/bg-metric-for-unlock-errors

add metric for unlock errors
James Allen 9 năm trước cách đây
mục cha
commit
54f128289f
1 tập tin đã thay đổi với 1 bổ sung và 0 xóa
  1. 1 0
      services/document-updater/app/coffee/LockManager.coffee

+ 1 - 0
services/document-updater/app/coffee/LockManager.coffee

@@ -87,6 +87,7 @@ module.exports = LockManager =
 			else if result? and result isnt 1 # successful unlock should release exactly one key
 				profile.log("unlockScript:expired-lock").end()
 				logger.error {doc_id:doc_id, key:key, lockValue:lockValue, redis_err:err, redis_result:result}, "unlocking error"
+				metrics.inc "unlock-error"
 				return callback(new Error("tried to release timed out lock"))
 			else
 				profile.log("unlockScript:ok").end()