queue.php 1.1 KB

1234567891011121314151617181920212223242526
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: yunwuxin <448901948@qq.com>
  10. // +----------------------------------------------------------------------
  11. use think\Env;
  12. return [
  13. // 'connector' => 'Sync'
  14. //Redis驱动
  15. 'connector' => 'redis',
  16. "expire" => 60,//任务过期时间默认为秒,禁用为null
  17. "default" => "default",//默认队列名称
  18. "host" => Env::get("redis.host", "127.0.0.1"),//Redis主机IP地址
  19. "port" => Env::get("redis.port", 6379),//Redis端口
  20. "password" => Env::get("redis.password", ""),//Redis密码
  21. "select" => 5,//Redis数据库索引
  22. "timeout" => 0,//Redis连接超时时间
  23. "persistent" => false,//是否长连接
  24. ];