/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $jobId = $input->getArgument('job-id'); $pheanstalk = $this->pheanstalkFactory->create(); $pheanstalk->delete($pheanstalk->peek($jobId)); $output->writeln(sprintf('<info>Successfully deleted job %s</info>', $jobId)); }
/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $jobState = $input->getOption('state'); $this->assertInputStateValid($jobState); $peekMethod = $this->jobStateMap[$jobState]; $output->writeln($this->formatOutput($this->pheanstalkFactory->create()->{$peekMethod}($input->getOption('tube')), $this->prettyPrinterLocator->determinePrinter($input->getOption('pretty')))); }
/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $tube = $input->getOption('tube'); $pheanstalk = $this->pheanstalkFactory->create(); $output->writeln($this->formatOutput($pheanstalk->stats(), 'Server-Wide')); if ($tube) { $tubes = [$tube]; } else { $tubes = $pheanstalk->listTubes(); } foreach ($tubes as $tube) { $output->writeln($this->formatOutput($pheanstalk->statsTube($tube), $tube)); } }
/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln($this->formatOutput($this->pheanstalkFactory->create()->listTubes())); }
/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { $jobId = $input->getArgument('job-id'); $pheanstalk = $this->pheanstalkFactory->create(); $output->writeln($this->formatOutput($pheanstalk->statsJob($pheanstalk->peek($jobId)))); }
public function doRun(InputInterface $input, OutputInterface $output) { $this->pheanstalkFactory->setHost($input->getParameterOption('--host', self::DEFAULT_HOST)); $this->pheanstalkFactory->setPort($input->getParameterOption('--port', self::DEFAULT_PORT)); return parent::doRun($input, $output); }