Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14024369
D12822.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12822.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 8:39 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717137
Default Alt Text
D12822.diff (1 KB)
Attached To
Mode
D12822: Destroy associated worker tasks and notifications
Attached
Detach File
Event Timeline
Log In to Comment