From 268ee9ea405f44523b3dd5494fbb7377140226d2 Mon Sep 17 00:00:00 2001 From: arthurpar06 Date: Sun, 17 Nov 2024 16:44:15 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Providers/HorizonServiceProvider.php | 4 +-- config/horizon.php | 35 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/Providers/HorizonServiceProvider.php b/app/Providers/HorizonServiceProvider.php index 8b880ca89..878baa4bb 100644 --- a/app/Providers/HorizonServiceProvider.php +++ b/app/Providers/HorizonServiceProvider.php @@ -28,10 +28,10 @@ public function boot(): void protected function gate(): void { Gate::define('viewHorizon', function ($user) { - // By default only allow the first user to view the horizon dashboard + // By default only allow the first user to view the horizon dashboard // TODO: use an env key for this? return in_array($user->id, [ - 1 + 1, ]); }); } diff --git a/config/horizon.php b/config/horizon.php index 5101f6f09..67961ef8d 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -3,7 +3,6 @@ use Illuminate\Support\Str; return [ - /* |-------------------------------------------------------------------------- | Horizon Domain @@ -99,12 +98,12 @@ */ 'trim' => [ - 'recent' => 60, - 'pending' => 60, - 'completed' => 60, + 'recent' => 60, + 'pending' => 60, + 'completed' => 60, 'recent_failed' => 10080, - 'failed' => 10080, - 'monitored' => 10080, + 'failed' => 10080, + 'monitored' => 10080, ], /* @@ -135,7 +134,7 @@ 'metrics' => [ 'trim_snapshots' => [ - 'job' => 24, + 'job' => 24, 'queue' => 24, ], ], @@ -181,24 +180,24 @@ 'defaults' => [ 'supervisor-1' => [ - 'connection' => 'redis', - 'queue' => ['default'], - 'balance' => 'auto', + 'connection' => 'redis', + 'queue' => ['default'], + 'balance' => 'auto', 'autoScalingStrategy' => 'time', - 'maxProcesses' => 1, - 'maxTime' => 0, - 'maxJobs' => 0, - 'memory' => 128, - 'tries' => 1, - 'timeout' => 60, - 'nice' => 0, + 'maxProcesses' => 1, + 'maxTime' => 0, + 'maxJobs' => 0, + 'memory' => 128, + 'tries' => 1, + 'timeout' => 60, + 'nice' => 0, ], ], 'environments' => [ 'production' => [ 'supervisor-1' => [ - 'maxProcesses' => 10, + 'maxProcesses' => 10, 'balanceMaxShift' => 1, 'balanceCooldown' => 3, ],