queue.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\facade\Env;
  12. return [
  13. 'default' => 'redis',
  14. 'prefix' => 'crmeb_',
  15. 'connections' => [
  16. 'sync' => [
  17. 'driver' => 'sync',
  18. ],
  19. 'database' => [
  20. 'driver' => 'database',
  21. 'queue' => 'default',
  22. 'table' => 'jobs',
  23. ],
  24. 'redis' => [
  25. 'driver' => 'redis',
  26. 'queue' => 'CRMEB' . Env::get('queue.queue_name', ''),
  27. 'host' => Env::get('redis.redis_hostname', '127.0.0.1'),
  28. 'port' => Env::get('redis.port', 6379),
  29. 'password' => Env::get('redis.redis_password', ''),
  30. 'select' => Env::get('redis.select', 0),
  31. 'timeout' => 0,
  32. 'persistent' => false,
  33. ],
  34. ],
  35. 'failed' => [
  36. 'type' => 'database',
  37. 'table' => 'failed_jobs',
  38. ],
  39. ];