rabbah commented on a change in pull request #2533: Add the ability to define 
user-specific throttles.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2533#discussion_r129855124
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
 ##########
 @@ -82,8 +82,8 @@ protected[core] abstract class EntitlementProvider(config: 
WhiskConfig, loadBala
 
     private implicit val executionContext = actorSystem.dispatcher
 
-    private val invokeRateThrottler = new RateThrottler("actions per minute", 
config.actionInvokePerMinuteLimit.toInt)
-    private val triggerRateThrottler = new RateThrottler("triggers per 
minute", config.triggerFirePerMinuteLimit.toInt)
+    private val invokeRateThrottler = new RateThrottler("actions per minute", 
config.actionInvokePerMinuteLimit.toInt, _.limits.invocationsPerMinute)
 
 Review comment:
   the _ is a nice convenience but it took me a pause to understand what's 
happening here (I had to check the signature for the rate throttler - not sure 
if it's worth being more verbose for clarity now... maybe.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to