queue.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. return [
  12. /*
  13. |--------------------------------------------------------------------------
  14. | Default Queue Connection Name
  15. |--------------------------------------------------------------------------
  16. |
  17. | Laravel's queue API supports an assortment of back-ends via a single
  18. | API, giving you convenient access to each back-end using the same
  19. | syntax for every one. Here you may define a default connection.
  20. |
  21. */
  22. 'default' => env('QUEUE_CONNECTION', 'sync'),
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Queue Connections
  26. |--------------------------------------------------------------------------
  27. |
  28. | Here you may configure the connection information for each server that
  29. | is used by your application. A default configuration has been added
  30. | for each back-end shipped with Laravel. You are free to add more.
  31. |
  32. | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
  33. |
  34. */
  35. 'connections' => [
  36. 'sync' => [
  37. 'driver' => 'sync',
  38. ],
  39. 'database' => [
  40. 'driver' => 'database',
  41. 'table' => 'jobs',
  42. 'queue' => 'default',
  43. 'retry_after' => 90,
  44. ],
  45. 'beanstalkd' => [
  46. 'driver' => 'beanstalkd',
  47. 'host' => 'localhost',
  48. 'queue' => 'default',
  49. 'retry_after' => 90,
  50. 'block_for' => 0,
  51. ],
  52. 'sqs' => [
  53. 'driver' => 'sqs',
  54. 'key' => env('AWS_ACCESS_KEY_ID'),
  55. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  56. 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
  57. 'queue' => env('SQS_QUEUE', 'your-queue-name'),
  58. 'suffix' => env('SQS_SUFFIX'),
  59. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  60. ],
  61. 'redis' => [
  62. 'driver' => 'redis',
  63. 'connection' => 'default',
  64. 'queue' => env('REDIS_QUEUE', 'default'),
  65. 'retry_after' => 90,
  66. 'block_for' => null,
  67. ],
  68. ],
  69. /*
  70. |--------------------------------------------------------------------------
  71. | Failed Queue Jobs
  72. |--------------------------------------------------------------------------
  73. |
  74. | These options configure the behavior of failed queue job logging so you
  75. | can control which database and table are used to store the jobs that
  76. | have failed. You may change them to any database / table you wish.
  77. |
  78. */
  79. 'failed' => [
  80. 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
  81. 'database' => env('DB_CONNECTION', 'mysql'),
  82. 'table' => 'failed_jobs',
  83. ],
  84. ];