Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14727370
D11435.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
D11435.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -5884,7 +5884,10 @@
'PhabricatorWorkerTaskData' => 'PhabricatorWorkerDAO',
'PhabricatorWorkerTaskDetailController' => 'PhabricatorDaemonController',
'PhabricatorWorkerTestCase' => 'PhabricatorTestCase',
- 'PhabricatorWorkerTrigger' => 'PhabricatorWorkerDAO',
+ 'PhabricatorWorkerTrigger' => array(
+ 'PhabricatorWorkerDAO',
+ 'PhabricatorDestructibleInterface',
+ ),
'PhabricatorWorkerTriggerEvent' => 'PhabricatorWorkerDAO',
'PhabricatorWorkerTriggerPHIDType' => 'PhabricatorPHIDType',
'PhabricatorWorkerTriggerQuery' => 'PhabricatorOffsetPagedQuery',
diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTrigger.php
@@ -1,7 +1,9 @@
<?php
final class PhabricatorWorkerTrigger
- extends PhabricatorWorkerDAO {
+ extends PhabricatorWorkerDAO
+ implements
+ PhabricatorDestructibleInterface {
protected $triggerVersion;
protected $clockClass;
@@ -127,4 +129,22 @@
return $this;
}
+
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
+
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ queryfx(
+ $this->establishConnection('w'),
+ 'DELETE FROM %T WHERE triggerID = %d',
+ id(new PhabricatorWorkerTriggerEvent())->getTableName(),
+ $this->getID());
+
+ $this->delete();
+ $this->saveTransaction();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 4:25 AM (20 h, 27 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7000801
Default Alt Text
D11435.diff (1 KB)
Attached To
Mode
D11435: Implement PhabricatorDestructibleInterface for event triggers
Attached
Detach File
Event Timeline
Log In to Comment