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

 ##########
 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) =>
 
 Review comment:
   possibly.  since the prior filter used `status == Status.ACTIVE`, i was 
thinking all rules without an _active_ status would be handled by this case.  
that said, i see that rules only have two statuses currently defined - ACTIVE 
and INACTIVE.  so either will work, with the former automatically handling any 
other non-active state - either for good or for bad.

----------------------------------------------------------------
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