配置文件位于 `config/queue.php`
使用redis作为消息队列
```
~~~
return [
'default' => 'redis',
'connections' => [
'sync' => [
'type' => 'sync',
],
'database' => [
'type' => 'database',
'queue' => 'default',
'table' => 'jobs',
'connection' => null,
],
'redis' => [
'type' => 'redis',
'queue' => 'default',//默认队列名称
'host' => '127.0.0.1',//Redis主机IP地址
'port' => 6379,//Redis端口
'password' => '',//Redis密码
'select' => 1,//Redis数据库
'timeout' => 0,//Redis连接超时时间
'persistent' => false,//是否长连接
],
],
'failed' => [
'type' => 'none',
'table' => 'failed_jobs',
],
];
~~~
```