Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14091092
D21517.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
D21517.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,10 @@
'param' => 'int',
'help' => pht('Limit to tasks with at least this many failures.'),
),
+ array(
+ 'name' => 'active',
+ 'help' => pht('Select all active tasks.'),
+ ),
);
}
@@ -28,10 +32,13 @@
$ids = $args->getArg('id');
$class = $args->getArg('class');
$min_failures = $args->getArg('min-failure-count');
+ $active = $args->getArg('active');
- if (!$ids && !$class && !$min_failures) {
+ if (!$ids && !$class && !$min_failures && !$active) {
throw new PhutilArgumentUsageException(
- pht('Use --id, --class, or --min-failure-count to select tasks.'));
+ pht(
+ 'Use "--id", "--class", "--active", and/or "--min-failure-count" '.
+ 'to select tasks.'));
}
$active_query = new PhabricatorWorkerActiveTaskQuery();
@@ -56,7 +63,13 @@
}
$active_tasks = $active_query->execute();
- $archive_tasks = $archive_query->execute();
+
+ if ($active) {
+ $archive_tasks = array();
+ } else {
+ $archive_tasks = $archive_query->execute();
+ }
+
$tasks =
mpull($active_tasks, null, 'getID') +
mpull($archive_tasks, null, 'getID');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 10:14 PM (19 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6787142
Default Alt Text
D21517.diff (1 KB)
Attached To
Mode
D21517: Support an "--active" flag for selecting active tasks
Attached
Detach File
Event Timeline
Log In to Comment