mdeuser commented on a change in pull request #3031: WIP: Return 202 for 
trigger fire requests
URL: 
https://github.com/apache/incubator-openwhisk/pull/3031#discussion_r154502296
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##########
 @@ -155,19 +155,25 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
               case (ruleName, rule) => rule.status == Status.ACTIVE
             } foreach {
               case (ruleName, rule) =>
+                val ruleActivationId = activationIdFactory.make()
                 val ruleActivation = WhiskActivation(
                   namespace = user.namespace.toPath, // all activations should 
end up in the one space regardless trigger.namespace,
                   ruleName.name,
                   user.subject,
-                  activationIdFactory.make(),
+                  ruleActivationId,
                   Instant.now(Clock.systemUTC()),
                   Instant.EPOCH,
                   cause = Some(triggerActivationId),
                   response = ActivationResponse.success(),
                   version = trigger.version,
                   duration = None)
-                logging.info(this, s"[POST] rule ${ruleName} activated, 
writing activation record to datastore")
-                WhiskActivation.put(activationStore, ruleActivation)
+                logging.info(
+                  this,
+                  s"[POST] rule ${ruleName} activated, writing activation 
record to datastore: $ruleActivationId")
+                WhiskActivation.put(activationStore, ruleActivation) recover {
+                  case t =>
+                    logging.error(this, s"[POST] storing rule activation 
$ruleActivationId failed: ${t.getMessage}")
 
 Review comment:
   Same as today.  No activation record is available.

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