25 lines
580 B
PHP
25 lines
580 B
PHP
<?php
|
|
|
|
namespace BeyondCode\LaravelWebSockets\Queue;
|
|
|
|
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
|
|
);
|
|
}
|
|
}
|