From fabb49baea94c088ecf7429fa025847e6e586af7 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Wed, 1 Sep 2021 02:11:19 +0900 Subject: [PATCH] update: horizon auth --- app/Providers/HorizonServiceProvider.php | 1 + config/horizon.php | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/Providers/HorizonServiceProvider.php b/app/Providers/HorizonServiceProvider.php index 08881175..119fd690 100644 --- a/app/Providers/HorizonServiceProvider.php +++ b/app/Providers/HorizonServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Gate; use Laravel\Horizon\Horizon; use Laravel\Horizon\HorizonApplicationServiceProvider; diff --git a/config/horizon.php b/config/horizon.php index af6bb84b..bd9657e0 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -70,7 +70,7 @@ return [ | */ - 'middleware' => ['web'], + 'middleware' => ['web', 'admin'], /* |-------------------------------------------------------------------------- @@ -168,9 +168,16 @@ return [ 'production' => [ 'supervisor-1' => [ 'connection' => 'redis', - 'queue' => ['default'], - 'balance' => 'simple', - 'processes' => 10, + 'queue' => [ + 'traffic_fetch', + 'server_log', + 'send_email', + 'send_telegram', + 'stat_server' + ], + 'balance' => 'auto', + 'minProcesses' => 8, + 'maxProcesses' => 16, 'tries' => 1, 'nice' => 0, ], @@ -187,8 +194,8 @@ return [ 'stat_server' ], 'balance' => 'auto', - 'minProcesses' => 1, - 'maxProcesses' => 10, + 'minProcesses' => 8, + 'maxProcesses' => 16, 'tries' => 1, 'nice' => 0, ],