Add bin/worker flood, for flooding the task queue with work
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
This commit is contained in:
21
scripts/setup/manage_worker.php
Executable file
21
scripts/setup/manage_worker.php
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/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);
|
||||
Reference in New Issue
Block a user