diff --git a/readme.md b/readme.md index 263e234..ea6acf5 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Laravel 5 Async Queue Driver +# Laravel 5.3 Async Queue Driver ## Push a function/closure to the background. diff --git a/src/Console/AsyncCommand.php b/src/Console/AsyncCommand.php index c6f1ef4..16a3fe8 100644 --- a/src/Console/AsyncCommand.php +++ b/src/Console/AsyncCommand.php @@ -5,6 +5,7 @@ use Barryvdh\Queue\AsyncQueue; use Illuminate\Console\Command; use Illuminate\Queue\Worker; +use Illuminate\Queue\WorkerOptions; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; @@ -47,13 +48,13 @@ public function __construct(Worker $worker) * * @return void */ - public function fire() + public function fire(WorkerOptions $options) { $id = $this->argument('id'); $connection = $this->argument('connection'); $this->processJob( - $connection, $id + $connection, $id, $options ); } @@ -62,7 +63,7 @@ public function fire() * Process the job * */ - protected function processJob($connectionName, $id) + protected function processJob($connectionName, $id, $options) { $manager = $this->worker->getManager(); $connection = $manager->connection($connectionName); @@ -77,7 +78,7 @@ protected function processJob($connectionName, $id) $sleep = max($job->getDatabaseJob()->available_at - time(), 0); sleep($sleep); return $this->worker->process( - $manager->getName($connectionName), $job + $manager->getName($connectionName), $job, $options ); }