rabbah commented on a change in pull request #3366: Adds method 
deleteAttachments to ArtifactStore
URL: 
https://github.com/apache/incubator-openwhisk/pull/3366#discussion_r172757550
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala
 ##########
 @@ -376,6 +376,24 @@ object WhiskAction extends DocumentFactory[WhiskAction] 
with WhiskEntityQueries[
     }
   }
 
+  override def del[Wsuper >: WhiskAction](db: ArtifactStore[Wsuper], doc: 
DocInfo)(
+    implicit transid: TransactionId,
+    notifier: Option[CacheChangeNotification]): Future[Boolean] = {
+    Try {
+      require(db != null, "db undefined")
+      require(doc != null, "doc undefined")
+    }.map { _ =>
+      val fa = super.del(db, doc)
+      implicit val ec = db.executionContext
+      fa.flatMap { _ =>
+        super.deleteAttachments(db, doc)
 
 Review comment:
   Thinking strictly about an action, today you?d know what based on the exec 
type and attached details. Eventually we will store all blobs as attachments so 
it may be inconsequential. 

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