You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.6 KiB

8 years ago
8 years ago
8 years ago
8 years ago
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Queue Driver
  6. |--------------------------------------------------------------------------
  7. |
  8. | Laravel's queue API supports an assortment of back-ends via a single
  9. | API, giving you convenient access to each back-end using the same
  10. | syntax for each one. Here you may set the default queue driver.
  11. |
  12. | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
  13. |
  14. */
  15. // 通过在.env中的 QUEUE_CONNECTION 选项,来决定选择何种驱动
  16. 'default' => env('QUEUE_DRIVER', 'sync'),
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Queue Connections
  20. |--------------------------------------------------------------------------
  21. |
  22. | Here you may configure the connection information for each server that
  23. | is used by your application. A default configuration has been added
  24. | for each back-end shipped with Laravel. You are free to add more.
  25. |
  26. */
  27. 'connections' => [
  28. 'sync' => [
  29. 'driver' => 'sync',
  30. ],
  31. 'database' => [
  32. 'driver' => 'database',
  33. 'table' => 'jobs',
  34. 'queue' => 'default',
  35. 'retry_after' => 90,
  36. ],
  37. 'beanstalkd' => [
  38. 'driver' => 'beanstalkd',
  39. 'host' => 'localhost',
  40. 'queue' => 'default',
  41. 'retry_after' => 90,
  42. ],
  43. 'sqs' => [
  44. 'driver' => 'sqs',
  45. 'key' => 'your-public-key',
  46. 'secret' => 'your-secret-key',
  47. 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
  48. 'queue' => 'your-queue-name',
  49. 'region' => 'us-east-1',
  50. ],
  51. 'redis' => [
  52. 'driver' => 'redis',
  53. 'connection' => 'default',
  54. 'queue' => env('REDIS_QUEUE', 'default'),
  55. 'retry_after' => 90,
  56. ],
  57. ],
  58. /*
  59. |--------------------------------------------------------------------------
  60. | Failed Queue Jobs
  61. |--------------------------------------------------------------------------
  62. |
  63. | These options configure the behavior of failed queue job logging so you
  64. | can control which database and table are used to store the jobs that
  65. | have failed. You may change them to any database / table you wish.
  66. |
  67. */
  68. // 队列有可能失败,失败的队列会写入到mysql的failed_jobs表里面
  69. 'failed' => [
  70. 'database' => env('DB_CONNECTION', 'mysql'),
  71. 'table' => 'failed_jobs',
  72. ],
  73. ];