Page MenuHomePhabricator

D11089.id26618.diff
No OneTemporary

D11089.id26618.diff

diff --git a/src/infrastructure/daemon/workers/query/PhabricatorWorkerArchiveTaskQuery.php b/src/infrastructure/daemon/workers/query/PhabricatorWorkerArchiveTaskQuery.php
--- a/src/infrastructure/daemon/workers/query/PhabricatorWorkerArchiveTaskQuery.php
+++ b/src/infrastructure/daemon/workers/query/PhabricatorWorkerArchiveTaskQuery.php
@@ -6,6 +6,7 @@
private $ids;
private $dateModifiedSince;
private $dateCreatedBefore;
+ private $objectPHIDs;
private $limit;
public function withIDs(array $ids) {
@@ -23,20 +24,24 @@
return $this;
}
+ public function withObjectPHIDs(array $phids) {
+ $this->objectPHIDs = $phids;
+ return $this;
+ }
+
public function setLimit($limit) {
$this->limit = $limit;
return $this;
}
public function execute() {
-
$task_table = new PhabricatorWorkerArchiveTask();
$conn_r = $task_table->establishConnection('r');
$rows = queryfx_all(
$conn_r,
- 'SELECT * FROM %T %Q %Q',
+ 'SELECT * FROM %T %Q ORDER BY id DESC %Q',
$task_table->getTableName(),
$this->buildWhereClause($conn_r),
$this->buildLimitClause($conn_r));
@@ -54,6 +59,13 @@
$this->ids);
}
+ if ($this->objectPHIDs !== null) {
+ $where[] = qsprintf(
+ $conn_r,
+ 'objectPHID IN (%Ls)',
+ $this->objectPHIDs);
+ }
+
if ($this->dateModifiedSince) {
$where[] = qsprintf(
$conn_r,

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 23, 3:34 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705913
Default Alt Text
D11089.id26618.diff (1 KB)

Event Timeline