mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
7e1c312183
Summary: Ref T6615. Ref T3554. We need better tooling around the queue eventually, so start here. Test Plan: Added 100K+ tasks locally with `bin/worker flood`. Executed some of them with `bin/phd debug taskmaster` (we already have a TestWorker, used in unit tests). Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T3554, T6615 Differential Revision: https://secure.phabricator.com/D10894
21 lines
557 B
PHP
Executable file
21 lines
557 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
$root = dirname(dirname(dirname(__FILE__)));
|
|
require_once $root.'/scripts/__init_script__.php';
|
|
|
|
$args = new PhutilArgumentParser($argv);
|
|
$args->setTagline('manage task queue');
|
|
$args->setSynopsis(<<<EOSYNOPSIS
|
|
**worker** __command__ [__options__]
|
|
Manage the task queue.
|
|
|
|
EOSYNOPSIS
|
|
);
|
|
$args->parseStandardArguments();
|
|
|
|
$workflows = id(new PhutilSymbolLoader())
|
|
->setAncestorClass('PhabricatorWorkerManagementWorkflow')
|
|
->loadObjects();
|
|
$workflows[] = new PhutilHelpArgumentWorkflow();
|
|
$args->parseWorkflows($workflows);
|