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

increase compile throttle limit

Henry Oswald 11 лет назад
Родитель
Сommit
91a84cb232

+ 2 - 2
services/web/app/coffee/Features/Compile/CompileController.coffee

@@ -50,9 +50,9 @@ module.exports = CompileController =
 			else
 				rateLimitOpts =
 					endpointName: "full-pdf-download"
-					throttle: 100
+					throttle: 1000
 					subjectName : req.ip
-					timeInterval : 60 * 10
+					timeInterval : 60 * 60
 				RateLimiter.addCount rateLimitOpts, callback
 
 		Project.findById project_id, {name: 1}, (err, project)->

+ 1 - 1
services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee

@@ -135,7 +135,7 @@ describe "CompileController", ->
 				@req.query = {}
 				@RateLimiter.addCount.callsArgWith(1, null, true)
 				@CompileController.proxyToClsi = (project_id, url)=>
-					@RateLimiter.addCount.args[0][0].throttle.should.equal 100
+					@RateLimiter.addCount.args[0][0].throttle.should.equal 1000
 					done()
 				@CompileController.downloadPdf @req, @res