[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorWorkerManagementFloodWorkflow 4 extends PhabricatorWorkerManagementWorkflow { 5 6 public function didConstruct() { 7 $this 8 ->setName('flood') 9 ->setExamples('**flood**') 10 ->setSynopsis( 11 pht( 12 'Flood the queue with test tasks. This command is intended for '. 13 'use when developing and debugging Phabricator.')) 14 ->setArguments(array()); 15 } 16 17 public function execute(PhutilArgumentParser $args) { 18 $console = PhutilConsole::getConsole(); 19 20 $console->writeOut( 21 "%s\n", 22 pht('Adding many test tasks to worker queue. Use ^C to exit.')); 23 24 $n = 0; 25 while (true) { 26 PhabricatorWorker::scheduleTask( 27 'PhabricatorTestWorker', 28 array()); 29 30 if (($n++ % 100) === 0) { 31 $console->writeOut('.'); 32 } 33 } 34 } 35 36 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |