Page MenuHomePhabricator

D11428.id27455.diff
No OneTemporary

D11428.id27455.diff

diff --git a/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php b/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php
--- a/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php
+++ b/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php
@@ -6,6 +6,8 @@
const ORDER_EXECUTION = 'execution';
const ORDER_VERSION = 'version';
+ private $ids;
+ private $phids;
private $versionMin;
private $versionMax;
private $nextEpochMin;
@@ -14,6 +16,16 @@
private $needEvents;
private $order = self::ORDER_EXECUTION;
+ public function withIDs(array $ids) {
+ $this->ids = $ids;
+ return $this;
+ }
+
+ public function withPHIDs(array $phids) {
+ $this->phids = $phids;
+ return $this;
+ }
+
public function withVersionBetween($min, $max) {
$this->versionMin = $min;
$this->versionMax = $max;
@@ -126,6 +138,20 @@
private function buildWhereClause(AphrontDatabaseConnection $conn_r) {
$where = array();
+ if ($this->ids !== null) {
+ $where[] = qsprintf(
+ $conn_r,
+ 't.id IN (%Ld)',
+ $this->ids);
+ }
+
+ if ($this->phids !== null) {
+ $where[] = qsprintf(
+ $conn_r,
+ 't.phid IN (%Ls)',
+ $this->phids);
+ }
+
if ($this->versionMin !== null) {
$where[] = qsprintf(
$conn_r,

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 24, 11:37 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9108113
Default Alt Text
D11428.id27455.diff (1 KB)

Event Timeline