Page MenuHomePhabricator

D8092.id.diff
No OneTemporary

D8092.id.diff

Index: src/applications/harbormaster/engine/HarbormasterBuildEngine.php
===================================================================
--- src/applications/harbormaster/engine/HarbormasterBuildEngine.php
+++ src/applications/harbormaster/engine/HarbormasterBuildEngine.php
@@ -101,6 +101,22 @@
->setViewer($this->getViewer())
->withBuildPHIDs(array($build->getPHID()))
->execute();
+
+ if (!$targets) {
+ return;
+ }
+
+ $target_phids = mpull($targets, 'getPHID');
+
+ $artifacts = id(new HarbormasterBuildArtifactQuery())
+ ->setViewer($this->getViewer())
+ ->withBuildTargetPHIDs($target_phids)
+ ->execute();
+
+ foreach ($artifacts as $artifact) {
+ $artifact->delete();
+ }
+
foreach ($targets as $target) {
$target->delete();
}

File Metadata

Mime Type
text/plain
Expires
Wed, May 29, 7:45 AM (4 w, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295351
Default Alt Text
D8092.id.diff (820 B)

Event Timeline