2020-09-25 19:16:06 +00:00
|
|
|
<?php
|
|
|
|
|
|
2025-01-16 07:54:02 +00:00
|
|
|
namespace BlaxSoftware\LaravelWebSockets\Queue;
|
2020-09-25 19:16:06 +00:00
|
|
|
|
|
|
|
|
use Illuminate\Queue\Connectors\RedisConnector;
|
|
|
|
|
|
|
|
|
|
class AsyncRedisConnector extends RedisConnector
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Establish a queue connection.
|
|
|
|
|
*
|
|
|
|
|
* @param array $config
|
|
|
|
|
* @return \Illuminate\Contracts\Queue\Queue
|
|
|
|
|
*/
|
|
|
|
|
public function connect(array $config)
|
|
|
|
|
{
|
|
|
|
|
return new AsyncRedisQueue(
|
|
|
|
|
$this->redis, $config['queue'],
|
|
|
|
|
$config['connection'] ?? $this->connection,
|
|
|
|
|
$config['retry_after'] ?? 60,
|
|
|
|
|
$config['block_for'] ?? null
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|