mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
don't increase rate limit when tasks are failing
This commit is contained in:
parent
1ef258c878
commit
2e5d57cd99
1 changed files with 3 additions and 2 deletions
|
@ -34,5 +34,6 @@ module.exports = class RateLimiter
|
|||
@_adjustLimitDown()
|
||||
else
|
||||
logger.log {active: @ActiveWorkerCount, currentLimit: Math.ceil(@CurrentWorkerLimit)}, "hit rate limit"
|
||||
@_trackAndRun task, callback # only return after task completes
|
||||
@_adjustLimitUp()
|
||||
@_trackAndRun task, (err) =>
|
||||
@_adjustLimitUp() if !err? # don't increment rate limit if there was an error
|
||||
callback(err) # only return after task completes
|
||||
|
|
Loading…
Reference in a new issue