Page MenuHomePhabricator

D11435.diff
No OneTemporary

D11435.diff

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

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)

Event Timeline