Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->ids = array();
     if ($id = $input->getOption('id')) {
         $this->ids[] = $id;
         $this->validateState(false);
         $this->validateTube(false);
     }
     parent::execute($input, $output);
     if ($id) {
         $job = $this->getQueue()->peekJob(intval($id));
         $output->writeln("Peeking at job <info>#{$job->getId()}</info>");
         $output->writeln($this->renderJobData($job));
     }
     if ($input->getOption('stats')) {
         $this->renderStats($output, $this->ids);
     }
 }
Beispiel #2
0
 protected function configure()
 {
     parent::configure();
     $this->setName('pause')->setDescription('Pause tubes')->addArgument('delay', InputArgument::OPTIONAL, 'Pause the tube(s) for this many seconds', 0)->addTubeArgument();
 }
Beispiel #3
0
 protected function configure()
 {
     parent::configure();
     $this->setName('delete')->setDescription('Delete jobs')->addTubeArgument()->addStateOptions()->addNumberOption();
 }
Beispiel #4
0
 protected function configure()
 {
     parent::configure();
     $this->setName('bury')->setDescription('Bury jobs')->addTubeArgument()->addNumberOption();
 }
Beispiel #5
0
 protected function configure()
 {
     parent::configure();
     $this->setName('kick')->setDescription('Kick buried and delayed jobs')->addTubeArgument()->addNumberOption();
 }