mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
stop OpRangeNotAvailable errors going to sentry
This commit is contained in:
@@ -2,6 +2,7 @@ Settings = require('settings-sharelatex')
|
||||
logger = require('logger-sharelatex')
|
||||
Keys = require('./UpdateKeys')
|
||||
redis = require("redis-sharelatex")
|
||||
Errors = require("./Errors")
|
||||
|
||||
UpdateManager = require('./UpdateManager')
|
||||
Metrics = require('./Metrics')
|
||||
@@ -23,7 +24,9 @@ module.exports = DispatchManager =
|
||||
# Dispatch this in the background
|
||||
backgroundTask = (cb) ->
|
||||
UpdateManager.processOutstandingUpdatesWithLock project_id, doc_id, (error) ->
|
||||
logger.error err: error, project_id: project_id, doc_id: doc_id, "error processing update" if error?
|
||||
# log everything except OpRangeNotAvailable errors, these are normal
|
||||
if error? and not (error instanceof Errors.OpRangeNotAvailableError)
|
||||
logger.error err: error, project_id: project_id, doc_id: doc_id, "error processing update"
|
||||
cb()
|
||||
RateLimiter.run backgroundTask, callback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user