From fc3ecddd0e6b8a406be9b6de3f0de2771be30f87 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 12 Oct 2017 16:18:14 +0100 Subject: [PATCH] fix two bugs in auto compile limit logic 1. the compileGroup is "standard" not default 2. was not excluding normal compiles from metrics --- .../web/app/coffee/Features/Compile/CompileManager.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Compile/CompileManager.coffee b/services/web/app/coffee/Features/Compile/CompileManager.coffee index 9e50b280e2..f18dc56c7b 100755 --- a/services/web/app/coffee/Features/Compile/CompileManager.coffee +++ b/services/web/app/coffee/Features/Compile/CompileManager.coffee @@ -77,7 +77,10 @@ module.exports = CompileManager = return callback null, true _checkCompileGroupAutoCompileLimit: (isAutoCompile, compileGroup, callback = (err, canCompile)->)-> - if compileGroup is "default" + if !isAutoCompile + return callback(null, true) + if compileGroup is "standard" + # apply extra limits to the standard compile group CompileManager._checkIfAutoCompileLimitHasBeenHit isAutoCompile, compileGroup, callback else Metrics.inc "auto-compile-#{compileGroup}"