From f80e481263340a3a491550f588f33ed8058703ed Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 27 Oct 2016 17:16:47 -0400 Subject: [PATCH] Add support for SQS and Redis in queue system --- .env.example | 10 +++++++++- config/queue.php | 29 +++++++---------------------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.env.example b/.env.example index ffb261134..3da515951 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,6 @@ DB_PASSWORD=secret CACHE_DRIVER=file SESSION_DRIVER=database -QUEUE_DRIVER=database MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io @@ -26,3 +25,12 @@ MAIL_FROM=you@example.com API_PREFIX=api API_VERSION=v1 API_DEBUG=false + +QUEUE_DRIVER=database +QUEUE_HIGH=high +QUEUE_STANDARD=standard +QUEUE_LOW=low + +SQS_KEY=aws-public +SQS_SECRET=aws-secret +SQS_QUEUE_PREFIX=aws-queue-prefix diff --git a/config/queue.php b/config/queue.php index 0d80b7c51..4ed92ba94 100644 --- a/config/queue.php +++ b/config/queue.php @@ -38,38 +38,23 @@ return [ 'database' => [ 'driver' => 'database', 'table' => 'jobs', - 'queue' => 'default', + 'queue' => env('QUEUE_STANDARD'), 'retry_after' => 60, ], - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 60, - ], - 'sqs' => [ 'driver' => 'sqs', - 'key' => 'your-public-key', - 'secret' => 'your-secret-key', - 'queue' => 'your-queue-url', - 'region' => 'us-east-1', - ], - - 'iron' => [ - 'driver' => 'iron', - 'host' => 'mq-aws-us-east-1.iron.io', - 'token' => 'your-token', - 'project' => 'your-project-id', - 'queue' => 'your-queue-name', - 'encrypt' => true, + 'key' => env('SQS_KEY'), + 'secret' => env('SQS_SECRET'), + 'prefix' => env('SQS_QUEUE_PREFIX'), + 'queue' => env('QUEUE_STANDARD'), + 'region' => env('SQS_REGION', 'us-east-1'), ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', - 'queue' => 'default', + 'queue' => env('QUEUE_STANDARD'), 'retry_after' => 60, ],