mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 06:31:52 +00:00
Merge pull request #503 from sharelatex/ja-reorder-compile-rate-limits
Re-order compile rate limits
This commit is contained in:
commit
4c7364fd01
1 changed files with 10 additions and 9 deletions
|
@ -18,9 +18,6 @@ module.exports = CompileManager =
|
||||||
timer.done()
|
timer.done()
|
||||||
_callback(args...)
|
_callback(args...)
|
||||||
|
|
||||||
@_checkIfAutoCompileLimitHasBeenHit options.isAutoCompile, "everyone", (err, canCompile)->
|
|
||||||
if !canCompile
|
|
||||||
return callback null, "autocompile-backoff", []
|
|
||||||
logger.log project_id: project_id, user_id: user_id, "compiling project"
|
logger.log project_id: project_id, user_id: user_id, "compiling project"
|
||||||
CompileManager._checkIfRecentlyCompiled project_id, user_id, (error, recentlyCompiled) ->
|
CompileManager._checkIfRecentlyCompiled project_id, user_id, (error, recentlyCompiled) ->
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
|
@ -28,6 +25,10 @@ module.exports = CompileManager =
|
||||||
logger.warn {project_id, user_id}, "project was recently compiled so not continuing"
|
logger.warn {project_id, user_id}, "project was recently compiled so not continuing"
|
||||||
return callback null, "too-recently-compiled", []
|
return callback null, "too-recently-compiled", []
|
||||||
|
|
||||||
|
CompileManager._checkIfAutoCompileLimitHasBeenHit options.isAutoCompile, "everyone", (err, canCompile)->
|
||||||
|
if !canCompile
|
||||||
|
return callback null, "autocompile-backoff", []
|
||||||
|
|
||||||
CompileManager._ensureRootDocumentIsSet project_id, (error) ->
|
CompileManager._ensureRootDocumentIsSet project_id, (error) ->
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
CompileManager.getProjectCompileLimits project_id, (error, limits) ->
|
CompileManager.getProjectCompileLimits project_id, (error, limits) ->
|
||||||
|
|
Loading…
Reference in a new issue