queue.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Queue Connection Name
  6. |--------------------------------------------------------------------------
  7. |
  8. | Laravel's queue supports a variety of backends via a single, unified
  9. | API, giving you convenient access to each backend using identical
  10. | syntax for each. The default queue connection is defined below.
  11. |
  12. */
  13. 'default' => env('QUEUE_CONNECTION', 'database'),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Queue Connections
  17. |--------------------------------------------------------------------------
  18. |
  19. | Here you may configure the connection options for every queue backend
  20. | used by your application. An example configuration is provided for
  21. | each backend supported by Laravel. You're also free to add more.
  22. |
  23. | Drivers: "sync", "database", "beanstalkd", "sqs", "redis",
  24. | "deferred", "failover", "null"
  25. |
  26. */
  27. 'connections' => [
  28. 'sync' => [
  29. 'driver' => 'sync',
  30. ],
  31. 'database' => [
  32. 'driver' => 'database',
  33. 'connection' => env('DB_QUEUE_CONNECTION'),
  34. 'table' => env('DB_QUEUE_TABLE', 'jobs'),
  35. 'queue' => env('DB_QUEUE', 'default'),
  36. 'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
  37. 'after_commit' => false,
  38. ],
  39. 'beanstalkd' => [
  40. 'driver' => 'beanstalkd',
  41. 'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
  42. 'queue' => env('BEANSTALKD_QUEUE', 'default'),
  43. 'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
  44. 'block_for' => 0,
  45. 'after_commit' => false,
  46. ],
  47. 'sqs' => [
  48. 'driver' => 'sqs',
  49. 'key' => env('AWS_ACCESS_KEY_ID'),
  50. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  51. 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
  52. 'queue' => env('SQS_QUEUE', 'default'),
  53. 'suffix' => env('SQS_SUFFIX'),
  54. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  55. 'after_commit' => false,
  56. ],
  57. 'redis' => [
  58. 'driver' => 'redis',
  59. 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
  60. 'queue' => env('REDIS_QUEUE', 'default'),
  61. 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
  62. 'block_for' => null,
  63. 'after_commit' => false,
  64. ],
  65. 'deferred' => [
  66. 'driver' => 'deferred',
  67. ],
  68. 'failover' => [
  69. 'driver' => 'failover',
  70. 'connections' => [
  71. 'database',
  72. 'deferred',
  73. ],
  74. ],
  75. ],
  76. /*
  77. |--------------------------------------------------------------------------
  78. | Job Batching
  79. |--------------------------------------------------------------------------
  80. |
  81. | The following options configure the database and table that store job
  82. | batching information. These options can be updated to any database
  83. | connection and table which has been defined by your application.
  84. |
  85. */
  86. 'batching' => [
  87. 'database' => env('DB_CONNECTION', 'sqlite'),
  88. 'table' => 'job_batches',
  89. ],
  90. /*
  91. |--------------------------------------------------------------------------
  92. | Failed Queue Jobs
  93. |--------------------------------------------------------------------------
  94. |
  95. | These options configure the behavior of failed queue job logging so you
  96. | can control how and where failed jobs are stored. Laravel ships with
  97. | support for storing failed jobs in a simple file or in a database.
  98. |
  99. | Supported drivers: "database-uuids", "dynamodb", "file", "null"
  100. |
  101. */
  102. 'failed' => [
  103. 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
  104. 'database' => env('DB_CONNECTION', 'sqlite'),
  105. 'table' => 'failed_jobs',
  106. ],
  107. ];