From 77b8fadfcdacf81d08119366c2bf4a10844796d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Iva=C5=9Fcu?= Date: Fri, 18 Nov 2016 12:32:45 +0200 Subject: [PATCH 1/2] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 21093d1479c2cd4ea6955a6c92bf85f42edf7c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Iva=C5=9Fcu?= Date: Fri, 18 Nov 2016 12:40:08 +0200 Subject: [PATCH 2/2] Laravel 5.3 WorkerOptions support --- src/Console/AsyncCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ); }