Skip to content

Commit f80e481

Browse files
committed
Add support for SQS and Redis in queue system
1 parent bb96039 commit f80e481

File tree

2 files changed

+16
-23
lines changed

2 files changed

+16
-23
lines changed

.env.example

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ DB_PASSWORD=secret
1313

1414
CACHE_DRIVER=file
1515
SESSION_DRIVER=database
16-
QUEUE_DRIVER=database
1716

1817
MAIL_DRIVER=smtp
1918
MAIL_HOST=mailtrap.io
@@ -26,3 +25,12 @@ MAIL_FROM=you@example.com
2625
API_PREFIX=api
2726
API_VERSION=v1
2827
API_DEBUG=false
28+
29+
QUEUE_DRIVER=database
30+
QUEUE_HIGH=high
31+
QUEUE_STANDARD=standard
32+
QUEUE_LOW=low
33+
34+
SQS_KEY=aws-public
35+
SQS_SECRET=aws-secret
36+
SQS_QUEUE_PREFIX=aws-queue-prefix

config/queue.php

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,38 +38,23 @@
3838
'database' => [
3939
'driver' => 'database',
4040
'table' => 'jobs',
41-
'queue' => 'default',
41+
'queue' => env('QUEUE_STANDARD'),
4242
'retry_after' => 60,
4343
],
4444

45-
'beanstalkd' => [
46-
'driver' => 'beanstalkd',
47-
'host' => 'localhost',
48-
'queue' => 'default',
49-
'retry_after' => 60,
50-
],
51-
5245
'sqs' => [
5346
'driver' => 'sqs',
54-
'key' => 'your-public-key',
55-
'secret' => 'your-secret-key',
56-
'queue' => 'your-queue-url',
57-
'region' => 'us-east-1',
58-
],
59-
60-
'iron' => [
61-
'driver' => 'iron',
62-
'host' => 'mq-aws-us-east-1.iron.io',
63-
'token' => 'your-token',
64-
'project' => 'your-project-id',
65-
'queue' => 'your-queue-name',
66-
'encrypt' => true,
47+
'key' => env('SQS_KEY'),
48+
'secret' => env('SQS_SECRET'),
49+
'prefix' => env('SQS_QUEUE_PREFIX'),
50+
'queue' => env('QUEUE_STANDARD'),
51+
'region' => env('SQS_REGION', 'us-east-1'),
6752
],
6853

6954
'redis' => [
7055
'driver' => 'redis',
7156
'connection' => 'default',
72-
'queue' => 'default',
57+
'queue' => env('QUEUE_STANDARD'),
7358
'retry_after' => 60,
7459
],
7560

0 commit comments

Comments
 (0)