queue.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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", "background", "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. 'background' => [
  69. 'driver' => 'background',
  70. ],
  71. 'failover' => [
  72. 'driver' => 'failover',
  73. 'connections' => [
  74. 'database',
  75. 'deferred',
  76. ],
  77. ],
  78. ],
  79. /*
  80. |--------------------------------------------------------------------------
  81. | Job Batching
  82. |--------------------------------------------------------------------------
  83. |
  84. | The following options configure the database and table that store job
  85. | batching information. These options can be updated to any database
  86. | connection and table which has been defined by your application.
  87. |
  88. */
  89. 'batching' => [
  90. 'database' => env('DB_CONNECTION', 'sqlite'),
  91. 'table' => 'job_batches',
  92. ],
  93. /*
  94. |--------------------------------------------------------------------------
  95. | Failed Queue Jobs
  96. |--------------------------------------------------------------------------
  97. |
  98. | These options configure the behavior of failed queue job logging so you
  99. | can control how and where failed jobs are stored. Laravel ships with
  100. | support for storing failed jobs in a simple file or in a database.
  101. |
  102. | Supported drivers: "database-uuids", "dynamodb", "file", "null"
  103. |
  104. */
  105. 'failed' => [
  106. 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
  107. 'database' => env('DB_CONNECTION', 'sqlite'),
  108. 'table' => 'failed_jobs',
  109. ],
  110. ];