Queue.php 493 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace think\swoole\command;
  3. use think\console\Command;
  4. use think\swoole\queue\Manager;
  5. class Queue extends Command
  6. {
  7. public function configure()
  8. {
  9. $this->setName('swoole:queue')
  10. ->setDescription('Listen to a given queue');
  11. }
  12. public function handle(Manager $manager)
  13. {
  14. $this->output->writeln('Swoole queue worker started');
  15. $this->output->writeln('You can exit with <info>`CTRL-C`</info>');
  16. $manager->run();
  17. }
  18. }