queue.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Queue Connection Name
  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 every one. Here you may define a default connection.
  11. |
  12. */
  13. 'default' => env('QUEUE_CONNECTION', 'sync'),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Queue Connections
  17. |--------------------------------------------------------------------------
  18. |
  19. | Here you may configure the connection information for each server that
  20. | is used by your application. A default configuration has been added
  21. | for each back-end shipped with Laravel. You are free to add more.
  22. |
  23. | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
  24. |
  25. */
  26. 'connections' => [
  27. 'sync' => [
  28. 'driver' => 'sync',
  29. ],
  30. 'database' => [
  31. 'driver' => 'database',
  32. 'table' => 'jobs',
  33. 'queue' => 'default',
  34. 'retry_after' => 90,
  35. 'after_commit' => false,
  36. ],
  37. 'beanstalkd' => [
  38. 'driver' => 'beanstalkd',
  39. 'host' => 'localhost',
  40. 'queue' => 'default',
  41. 'retry_after' => 90,
  42. 'block_for' => 0,
  43. 'after_commit' => false,
  44. ],
  45. 'sqs' => [
  46. 'driver' => 'sqs',
  47. 'key' => env('AWS_ACCESS_KEY_ID'),
  48. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  49. 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
  50. 'queue' => env('SQS_QUEUE', 'default'),
  51. 'suffix' => env('SQS_SUFFIX'),
  52. 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
  53. 'after_commit' => false,
  54. ],
  55. 'redis' => [
  56. 'driver' => 'redis',
  57. 'connection' => 'default',
  58. 'queue' => env('REDIS_QUEUE', 'default'),
  59. 'retry_after' => 90,
  60. 'block_for' => null,
  61. 'after_commit' => false,
  62. ],
  63. 'rabbitmq' => [
  64. 'driver' => 'rabbitmq',
  65. 'queue' => env('RABBITMQ_QUEUE', 'autocde'),
  66. 'hosts' => [
  67. [
  68. 'host' => env('RABBITMQ_HOST', '127.0.0.1'),
  69. 'port' => env('RABBITMQ_PORT', 5672),
  70. 'user' => env('RABBITMQ_USER', 'myuser'),
  71. 'password' => env('RABBITMQ_PASSWORD', 'mypass'),
  72. 'vhost' => env('RABBITMQ_VHOST', '/'),
  73. ],
  74. ],
  75. ],
  76. ],
  77. /*
  78. |--------------------------------------------------------------------------
  79. | Job Batching
  80. |--------------------------------------------------------------------------
  81. |
  82. | The following options configure the database and table that store job
  83. | batching information. These options can be updated to any database
  84. | connection and table which has been defined by your application.
  85. |
  86. */
  87. 'batching' => [
  88. 'database' => env('DB_CONNECTION', 'mysql'),
  89. 'table' => 'job_batches',
  90. ],
  91. /*
  92. |--------------------------------------------------------------------------
  93. | Failed Queue Jobs
  94. |--------------------------------------------------------------------------
  95. |
  96. | These options configure the behavior of failed queue job logging so you
  97. | can control which database and table are used to store the jobs that
  98. | have failed. You may change them to any database / table you wish.
  99. |
  100. */
  101. 'failed' => [
  102. 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
  103. 'database' => env('DB_CONNECTION', 'mysql'),
  104. 'table' => 'failed_jobs',
  105. ],
  106. ];