From cc3c59bf97959b0e4602e401fd3bd4db9197715c Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Thu, 10 Jun 2021 20:18:10 +0000 Subject: [PATCH] Shift config files --- config/app.php | 1 + config/queue.php | 51 +++++++++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/config/app.php b/config/app.php index 2f3eda64b7..6c0cfd81f4 100755 --- a/config/app.php +++ b/config/app.php @@ -368,6 +368,7 @@ return [ 'Config' => Illuminate\Support\Facades\Config::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'Date' => Illuminate\Support\Facades\Date::class, 'DB' => Illuminate\Support\Facades\DB::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Event' => Illuminate\Support\Facades\Event::class, diff --git a/config/queue.php b/config/queue.php index 6c2b7d2e17..25ea5a8193 100644 --- a/config/queue.php +++ b/config/queue.php @@ -4,19 +4,16 @@ return [ /* |-------------------------------------------------------------------------- - | Default Queue Driver + | Default Queue Connection Name |-------------------------------------------------------------------------- | - | The Laravel queue API supports a variety of back-ends via an unified + | Laravel's queue API supports an assortment of back-ends via a single | API, giving you convenient access to each back-end using the same - | syntax for each one. Here you may set the default queue driver. - | - | Supported: "null", "sync", "database", "beanstalkd", - | "sqs", "redis" + | syntax for every one. Here you may define a default connection. | */ - 'default' => env('QUEUE_DRIVER', 'sync'), + 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- @@ -27,6 +24,8 @@ return [ | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | */ 'connections' => [ @@ -37,32 +36,39 @@ return [ 'database' => [ 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'expire' => 60, + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + 'after_commit' => false, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'ttr' => 60, + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + 'block_for' => 0, + 'after_commit' => false, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => 'your-public-key', - 'secret' => 'your-secret-key', - 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', - 'queue' => 'your-queue-name', - 'region' => 'us-east-1', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, ], 'redis' => [ - 'driver' => 'redis', + 'driver' => 'redis', 'connection' => 'default', - 'queue' => 'default', - 'expire' => 60, + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => 90, + 'block_for' => null, + 'after_commit' => false, ], ], @@ -79,8 +85,9 @@ return [ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', + 'table' => 'failed_jobs', ], ];