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

 ##########
 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:
   as a future enhancement this could be done only when there is an attachment 
present and this code possibly merged into the document factory instead.

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