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); } }
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(); }
protected function configure() { parent::configure(); $this->setName('delete')->setDescription('Delete jobs')->addTubeArgument()->addStateOptions()->addNumberOption(); }
protected function configure() { parent::configure(); $this->setName('bury')->setDescription('Bury jobs')->addTubeArgument()->addNumberOption(); }
protected function configure() { parent::configure(); $this->setName('kick')->setDescription('Kick buried and delayed jobs')->addTubeArgument()->addNumberOption(); }