Page MenuHomePhabricator

D12822.id30818.diff
No OneTemporary

D12822.id30818.diff

diff --git a/src/applications/system/engine/PhabricatorDestructionEngine.php b/src/applications/system/engine/PhabricatorDestructionEngine.php
--- a/src/applications/system/engine/PhabricatorDestructionEngine.php
+++ b/src/applications/system/engine/PhabricatorDestructionEngine.php
@@ -46,6 +46,9 @@
$template = $object->getApplicationTransactionTemplate();
$this->destroyTransactions($template, $object_phid);
}
+
+ $this->destroyWorkerTasks($object_phid);
+ $this->destroyNotifications($object_phid);
}
// Nuke any Herald transcripts of the object, because they may contain
@@ -94,7 +97,28 @@
foreach ($xactions as $xaction) {
$this->destroyObject($xaction);
}
+ }
+
+ private function destroyWorkerTasks($object_phid) {
+ $tasks = id(new PhabricatorWorkerActiveTask())->loadAllWhere(
+ 'objectPHID = %s',
+ $object_phid);
+ foreach ($tasks as $task) {
+ $task->archiveTask(
+ PhabricatorWorkerArchiveTask::RESULT_CANCELLED,
+ 0);
+ }
+ }
+
+ private function destroyNotifications($object_phid) {
+ $notifications = id(new PhabricatorFeedStoryNotification())->loadAllWhere(
+ 'primaryObjectPHID = %s',
+ $object_phid);
+
+ foreach ($notifications as $notification) {
+ $notification->delete();
+ }
}
}

File Metadata

Mime Type
text/plain
Expires
Oct 16 2024, 10:37 AM (4 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717137
Default Alt Text
D12822.id30818.diff (1 KB)

Event Timeline