Page MenuHomePhabricator

D19493.id46617.diff
No OneTemporary

D19493.id46617.diff

diff --git a/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php b/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php
--- a/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php
+++ b/src/infrastructure/daemon/workers/management/PhabricatorWorkerManagementWorkflow.php
@@ -21,6 +21,11 @@
'param' => 'int',
'help' => pht('Limit to tasks with at least this many failures.'),
),
+ array(
+ 'name' => 'limit',
+ 'param' => 'int',
+ 'help' => pht('Limit the total number of tasks to act on.'),
+ ),
);
}
@@ -28,6 +33,7 @@
$ids = $args->getArg('id');
$class = $args->getArg('class');
$min_failures = $args->getArg('min-failure-count');
+ $limit = $args->getArg('limit');
if (!$ids && !$class && !$min_failures) {
throw new PhutilArgumentUsageException(
@@ -55,6 +61,11 @@
$min_failures, null);
}
+ if ($limit) {
+ $active_query->setLimit($limit);
+ $archive_query->setLimit($limit);
+ }
+
$active_tasks = $active_query->execute();
$archive_tasks = $archive_query->execute();
$tasks =

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 13, 6:02 AM (14 h, 18 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6872264
Default Alt Text
D19493.id46617.diff (1 KB)

Event Timeline