mdeuser commented on a change in pull request #2684: Decorate throttled error 
response with count/limit.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2684#discussion_r136565070
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/entitlement/ActivationThrottler.scala
 ##########
 @@ -39,11 +40,11 @@ class ActivationThrottler(loadBalancer: LoadBalancer, 
defaultConcurrencyLimit: I
     /**
      * Checks whether the operation should be allowed to proceed.
      */
-    def check(user: Identity)(implicit tid: TransactionId): Boolean = {
+    def check(user: Identity)(implicit tid: TransactionId): RateLimit = {
         val concurrentActivations = 
loadBalancer.activeActivationsFor(user.uuid)
         val concurrencyLimit = 
user.limits.concurrentInvocations.getOrElse(defaultConcurrencyLimit)
-        logging.info(this, s"namespace = ${user.uuid.asString}, concurrent 
activations = $concurrentActivations, below limit = $concurrencyLimit")
-        concurrentActivations < concurrencyLimit
+        logging.info(this, s"namespace = ${user.uuid.asString}, concurrent 
activations = $concurrentActivations, limit = $concurrencyLimit")
 
 Review comment:
   for easier log searching, having the user namespace string included with the 
namespace uuid would be nice.
 
----------------------------------------------------------------
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