Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14230613
D19493.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19493.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 12, 9:14 PM (5 h, 22 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6872264
Default Alt Text
D19493.diff (1 KB)
Attached To
Mode
D19493: Add a --limit argument to the `workers` management cli.
Attached
Detach File
Event Timeline
Log In to Comment