Просмотр исходного кода

fix two bugs in auto compile limit logic

1. the compileGroup is "standard" not default
2. was not excluding normal compiles from metrics
Brian Gough 9 лет назад
Родитель
Сommit
fc3ecddd0e
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      services/web/app/coffee/Features/Compile/CompileManager.coffee

+ 4 - 1
services/web/app/coffee/Features/Compile/CompileManager.coffee

@@ -77,7 +77,10 @@ module.exports = CompileManager =
 				return callback null, true
 				return callback null, true
 
 
 	_checkCompileGroupAutoCompileLimit: (isAutoCompile, compileGroup, callback = (err, canCompile)->)->
 	_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
 			CompileManager._checkIfAutoCompileLimitHasBeenHit isAutoCompile, compileGroup, callback
 		else
 		else
 			Metrics.inc "auto-compile-#{compileGroup}"
 			Metrics.inc "auto-compile-#{compileGroup}"