markusthoemmes commented on a change in pull request #3262: Handle trigger 
activations with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167063098
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##########
 @@ -300,13 +305,21 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   }
 
   /**
-   * Iterates through each active rule and invoke each mapped action.
+   * Iterates through each rule and invoking each active rule's mapped action.
    */
   private def activateRules(user: Identity,
                             args: JsObject,
                             rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
     implicit transid: TransactionId): Iterable[Future[JsObject]] = {
     rulesToActivate.map {
+      case (ruleName, rule) if (rule.status != Status.ACTIVE) =>
+        Future {
 
 Review comment:
   Please use `Future.successful`. Using `Future.apply` (as done here) results 
in a forced async-dispatch which is not needed here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to