Fix missing environment variables relating to queues

This commit is contained in:
Dane Everitt 2016-10-30 18:34:50 -04:00
parent 1c9f916dcb
commit a55220da39
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 11 additions and 3 deletions

View file

@ -82,6 +82,14 @@ class UpdateEnvironment extends Command
$variables['SERVICE_AUTHOR'] = env('SERVICE_AUTHOR', (string) Uuid::generate(4)); $variables['SERVICE_AUTHOR'] = env('SERVICE_AUTHOR', (string) Uuid::generate(4));
} }
if (!env('QUEUE_STANDARD', false) || !env('QUEUE_DRIVER', false)) {
$this->info('Setting default queue settings.');
$variables['QUEUE_DRIVER'] = env('QUEUE_DRIVER', 'database');
$variables['QUEUE_HIGH'] = env('QUEUE_HIGH', 'high');
$variables['QUEUE_STANDARD'] = env('QUEUE_STANDARD', 'standard');
$variables['QUEUE_LOW'] = env('QUEUE_LOW', 'low');
}
if (is_null($this->option('dbhost'))) { if (is_null($this->option('dbhost'))) {
$variables['DB_HOST'] = $this->anticipate('Database Host', [ 'localhost', '127.0.0.1', env('DB_HOST') ], env('DB_HOST')); $variables['DB_HOST'] = $this->anticipate('Database Host', [ 'localhost', '127.0.0.1', env('DB_HOST') ], env('DB_HOST'));
} else { } else {

View file

@ -38,7 +38,7 @@ return [
'database' => [ 'database' => [
'driver' => 'database', 'driver' => 'database',
'table' => 'jobs', 'table' => 'jobs',
'queue' => env('QUEUE_STANDARD'), 'queue' => env('QUEUE_STANDARD', 'standard'),
'retry_after' => 60, 'retry_after' => 60,
], ],
@ -47,14 +47,14 @@ return [
'key' => env('SQS_KEY'), 'key' => env('SQS_KEY'),
'secret' => env('SQS_SECRET'), 'secret' => env('SQS_SECRET'),
'prefix' => env('SQS_QUEUE_PREFIX'), 'prefix' => env('SQS_QUEUE_PREFIX'),
'queue' => env('QUEUE_STANDARD'), 'queue' => env('QUEUE_STANDARD', 'standard'),
'region' => env('SQS_REGION', 'us-east-1'), 'region' => env('SQS_REGION', 'us-east-1'),
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
'queue' => env('QUEUE_STANDARD'), 'queue' => env('QUEUE_STANDARD', 'standard'),
'retry_after' => 60, 'retry_after' => 60,
], ],