Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 841eaaf

Browse files
authored
Merge pull request barryvdh#58 from oriceon/master
Laravel 5.3 support
2 parents 5b425bb + 21093d1 commit 841eaaf

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel 5 Async Queue Driver
1+
# Laravel 5.3 Async Queue Driver
22

33
## Push a function/closure to the background.
44

src/Console/AsyncCommand.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Barryvdh\Queue\AsyncQueue;
66
use Illuminate\Console\Command;
77
use Illuminate\Queue\Worker;
8+
use Illuminate\Queue\WorkerOptions;
89
use Symfony\Component\Console\Input\InputArgument;
910
use Symfony\Component\Console\Input\InputOption;
1011

@@ -47,13 +48,13 @@ public function __construct(Worker $worker)
4748
*
4849
* @return void
4950
*/
50-
public function fire()
51+
public function fire(WorkerOptions $options)
5152
{
5253
$id = $this->argument('id');
5354
$connection = $this->argument('connection');
5455

5556
$this->processJob(
56-
$connection, $id
57+
$connection, $id, $options
5758
);
5859
}
5960

@@ -62,7 +63,7 @@ public function fire()
6263
* Process the job
6364
*
6465
*/
65-
protected function processJob($connectionName, $id)
66+
protected function processJob($connectionName, $id, $options)
6667
{
6768
$manager = $this->worker->getManager();
6869
$connection = $manager->connection($connectionName);
@@ -77,7 +78,7 @@ protected function processJob($connectionName, $id)
7778
$sleep = max($job->getDatabaseJob()->available_at - time(), 0);
7879
sleep($sleep);
7980
return $this->worker->process(
80-
$manager->getName($connectionName), $job
81+
$manager->getName($connectionName), $job, $options
8182
);
8283
}
8384

0 commit comments

Comments
 (0)