Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Laravel 5 Async Queue Driver
# Laravel 5.3 Async Queue Driver

## Push a function/closure to the background.

Expand Down
9 changes: 5 additions & 4 deletions src/Console/AsyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
);
}

Expand All @@ -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);
Expand All @@ -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
);
}

Expand Down