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_r167972222
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##########
 @@ -129,7 +129,7 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
 
           if (activeRules.nonEmpty) {
 
 Review comment:
   I'll suggest to go for the following:
   
   ```scala
   val rules = trigger.rules.getOrElse(Map.empty) // use this in belows call 
for activateRules
   
   if(rules.exists(_._2 == Status.ACTIVE)) {
      that code
   } else {
     complete(NoContent)
   }
   ```

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