Skip to content
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 src/Integrations/BindsWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait BindsWorker
protected $workerImplementations = [
'5\.[345678]\.\d+' => Laravel53Worker::class,
'[67]\.\d+\.\d+' => Laravel6Worker::class,
'([89]|10|11)\.\d+\.\d+' => Laravel8Worker::class
'([89]|10|11|12)\.\d+\.\d+' => Laravel8Worker::class
];

/**
Expand Down
20 changes: 18 additions & 2 deletions src/Wrappers/DefaultWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@
namespace Dusterio\AwsWorker\Wrappers;

use Illuminate\Queue\Worker;
use Illuminate\Queue\WorkerOptions;
use Illuminate\Contracts\Cache\Repository as Cache;

/**
* Class DefaultWorker
* @package Dusterio\AwsWorker\Wrappers
*/
class DefaultWorker implements WorkerInterface
{
/**
* @var Worker
*/
public $worker;

/**
* @var Cache
*/
public $cache;

/**
* DefaultWorker constructor.
* @param Worker $worker
* @param \Illuminate\Contracts\Cache\Repository $cache
*/
public function __construct(Worker $worker)
public function __construct(Worker $worker, Cache $cache)
{
$this->cache = $cache;
$this->worker = $worker;
}

Expand All @@ -27,8 +41,10 @@ public function __construct(Worker $worker)
*/
public function process($queue, $job, array $options)
{
$workerOptions = new WorkerOptions('default', $options['delay'], 128, $options['timeout'], 3, $options['maxTries']);

$this->worker->process(
$queue, $job, $options['maxTries'], $options['delay']
$queue, $job, $workerOptions
);
}
}