Skip to content

Commit a55220d

Browse files
committed
Fix missing environment variables relating to queues
1 parent 1c9f916 commit a55220d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

app/Console/Commands/UpdateEnvironment.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ public function handle()
8282
$variables['SERVICE_AUTHOR'] = env('SERVICE_AUTHOR', (string) Uuid::generate(4));
8383
}
8484

85+
if (!env('QUEUE_STANDARD', false) || !env('QUEUE_DRIVER', false)) {
86+
$this->info('Setting default queue settings.');
87+
$variables['QUEUE_DRIVER'] = env('QUEUE_DRIVER', 'database');
88+
$variables['QUEUE_HIGH'] = env('QUEUE_HIGH', 'high');
89+
$variables['QUEUE_STANDARD'] = env('QUEUE_STANDARD', 'standard');
90+
$variables['QUEUE_LOW'] = env('QUEUE_LOW', 'low');
91+
}
92+
8593
if (is_null($this->option('dbhost'))) {
8694
$variables['DB_HOST'] = $this->anticipate('Database Host', [ 'localhost', '127.0.0.1', env('DB_HOST') ], env('DB_HOST'));
8795
} else {

config/queue.php

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

@@ -47,14 +47,14 @@
4747
'key' => env('SQS_KEY'),
4848
'secret' => env('SQS_SECRET'),
4949
'prefix' => env('SQS_QUEUE_PREFIX'),
50-
'queue' => env('QUEUE_STANDARD'),
50+
'queue' => env('QUEUE_STANDARD', 'standard'),
5151
'region' => env('SQS_REGION', 'us-east-1'),
5252
],
5353

5454
'redis' => [
5555
'driver' => 'redis',
5656
'connection' => 'default',
57-
'queue' => env('QUEUE_STANDARD'),
57+
'queue' => env('QUEUE_STANDARD', 'standard'),
5858
'retry_after' => 60,
5959
],
6060

0 commit comments

Comments
 (0)