/** * Set the options on the queue listener. * * @return void */ protected function setListenerOptions() { $this->listener->setEnvironment($this->laravel->environment()); $this->listener->setSleep($this->option('sleep')); $this->listener->setMaxTries($this->option('tries')); $this->listener->setOutputHandler(function ($type, $line) { $this->output->write($line); }); }
/** * Execute the console command. * * @return void */ public function fire() { $this->listener->setEnvironment($this->laravel->environment()); $delay = $this->input->getOption('delay'); // The memory limit is the amount of memory we will allow the script to occupy // before killing it and letting a process manager restart it for us, which // is to protect us against any memory leaks that will be in the scripts. $memory = $this->input->getOption('memory'); $connection = $this->input->getArgument('connection'); $timeout = $this->input->getOption('timeout'); // We need to get the right queue for the connection which is set in the queue // configuration file for the application. We will pull it based on the set // connection being run for the queue operation currently being executed. $queue = $this->getQueue($connection); $this->listener->listen($connection, $queue, $delay, $memory, $timeout); }
/** * Set the options on the queue listener. * * @return void */ protected function setListenerOptions() { $this->listener->setEnvironment($this->laravel->environment()); $this->listener->setSleep($this->option('sleep')); }