Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15402906
D21531.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D21531.diff
View Options
diff --git a/resources/sql/autopatches/20210122.queuecontainer.01.sql b/resources/sql/autopatches/20210122.queuecontainer.01.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20210122.queuecontainer.01.sql
@@ -0,0 +1,5 @@
+ALTER TABLE {$NAMESPACE}_worker.worker_activetask
+ ADD containerPHID VARBINARY(64);
+
+ALTER TABLE {$NAMESPACE}_worker.worker_archivetask
+ ADD containerPHID VARBINARY(64);
diff --git a/src/infrastructure/daemon/workers/PhabricatorWorker.php b/src/infrastructure/daemon/workers/PhabricatorWorker.php
--- a/src/infrastructure/daemon/workers/PhabricatorWorker.php
+++ b/src/infrastructure/daemon/workers/PhabricatorWorker.php
@@ -134,6 +134,7 @@
array(
'priority' => 'optional int|null',
'objectPHID' => 'optional string|null',
+ 'containerPHID' => 'optional string|null',
'delayUntil' => 'optional int|null',
));
@@ -142,12 +143,14 @@
$priority = self::PRIORITY_DEFAULT;
}
$object_phid = idx($options, 'objectPHID');
+ $container_phid = idx($options, 'containerPHID');
$task = id(new PhabricatorWorkerActiveTask())
->setTaskClass($task_class)
->setData($data)
->setPriority($priority)
- ->setObjectPHID($object_phid);
+ ->setObjectPHID($object_phid)
+ ->setContainerPHID($container_phid);
$delay = idx($options, 'delayUntil');
if ($delay) {
diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php
@@ -116,6 +116,7 @@
->setDataID($this->getDataID())
->setPriority($this->getPriority())
->setObjectPHID($this->getObjectPHID())
+ ->setContainerPHID($this->getContainerPHID())
->setResult($result)
->setDuration($duration)
->setDateCreated($this->getDateCreated())
diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerArchiveTask.php
@@ -87,6 +87,7 @@
->setDataID($this->getDataID())
->setPriority($this->getPriority())
->setObjectPHID($this->getObjectPHID())
+ ->setContainerPHID($this->getContainerPHID())
->setDateCreated($this->getDateCreated())
->insert();
diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
--- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
+++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
@@ -11,6 +11,7 @@
protected $dataID;
protected $priority;
protected $objectPHID;
+ protected $containerPHID;
private $data;
private $executionException;
@@ -25,11 +26,15 @@
'failureTime' => 'epoch?',
'priority' => 'uint32',
'objectPHID' => 'phid?',
+ 'containerPHID' => 'phid?',
),
self::CONFIG_KEY_SCHEMA => array(
'key_object' => array(
'columns' => array('objectPHID'),
),
+ 'key_container' => array(
+ 'columns' => array('containerPHID'),
+ ),
),
) + parent::getConfiguration();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 12:57 AM (3 h, 51 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7385693
Default Alt Text
D21531.diff (3 KB)
Attached To
Mode
D21531: Add support for a "containerPHID" in the worker queue
Attached
Detach File
Event Timeline
Log In to Comment