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

 ##########
 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:
   @rabbah Any pointers on how to determine if an attachment is present ... or 
you meant expose a method in `DocumentFactory` like `hasAttachement` and use 
that and have that overridden in `WhiskAction`

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