diff --git a/app/Events/SpeedtestBenchmarkFailed.php b/app/Events/SpeedtestBenchmarkHealthy.php similarity index 90% rename from app/Events/SpeedtestBenchmarkFailed.php rename to app/Events/SpeedtestBenchmarkHealthy.php index b00175b13..2838d442b 100644 --- a/app/Events/SpeedtestBenchmarkFailed.php +++ b/app/Events/SpeedtestBenchmarkHealthy.php @@ -6,7 +6,7 @@ use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -class SpeedtestBenchmarkFailed +class SpeedtestBenchmarkHealthy { use Dispatchable, SerializesModels; diff --git a/app/Events/SpeedtestBenchmarkPassed.php b/app/Events/SpeedtestBenchmarkUnhealthy.php similarity index 90% rename from app/Events/SpeedtestBenchmarkPassed.php rename to app/Events/SpeedtestBenchmarkUnhealthy.php index ab8e9ae82..92b706e35 100644 --- a/app/Events/SpeedtestBenchmarkPassed.php +++ b/app/Events/SpeedtestBenchmarkUnhealthy.php @@ -6,7 +6,7 @@ use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -class SpeedtestBenchmarkPassed +class SpeedtestBenchmarkUnhealthy { use Dispatchable, SerializesModels; diff --git a/app/Jobs/Ookla/BenchmarkSpeedtestJob.php b/app/Jobs/Ookla/BenchmarkSpeedtestJob.php index c1298a147..6f6f0751a 100644 --- a/app/Jobs/Ookla/BenchmarkSpeedtestJob.php +++ b/app/Jobs/Ookla/BenchmarkSpeedtestJob.php @@ -3,9 +3,9 @@ namespace App\Jobs\Ookla; use App\Enums\ResultStatus; -use App\Events\SpeedtestBenchmarkFailed; +use App\Events\SpeedtestBenchmarkHealthy; use App\Events\SpeedtestBenchmarking; -use App\Events\SpeedtestBenchmarkPassed; +use App\Events\SpeedtestBenchmarkUnhealthy; use App\Helpers\Benchmark; use App\Models\Result; use App\Settings\ThresholdSettings; @@ -70,8 +70,8 @@ public function handle(): void ]); $this->healthy - ? SpeedtestBenchmarkPassed::dispatch($this->result) - : SpeedtestBenchmarkFailed::dispatch($this->result); + ? SpeedtestBenchmarkHealthy::dispatch($this->result) + : SpeedtestBenchmarkUnhealthy::dispatch($this->result); } private function benchmark(Result $result, ThresholdSettings $settings): array diff --git a/app/Listeners/ProcessUnhealthySpeedtest.php b/app/Listeners/ProcessUnhealthySpeedtest.php index f2e0d419c..288f60739 100644 --- a/app/Listeners/ProcessUnhealthySpeedtest.php +++ b/app/Listeners/ProcessUnhealthySpeedtest.php @@ -2,7 +2,7 @@ namespace App\Listeners; -use App\Events\SpeedtestBenchmarkFailed; +use App\Events\SpeedtestBenchmarkUnhealthy; use App\Helpers\Number; use App\Mail\UnhealthySpeedtestMail; use App\Models\Result; @@ -29,7 +29,7 @@ public function __construct( /** * Handle the event. */ - public function handle(SpeedtestBenchmarkFailed $event): void + public function handle(SpeedtestBenchmarkUnhealthy $event): void { $result = $event->result; diff --git a/app/Listeners/UserNotificationSubscriber.php b/app/Listeners/UserNotificationSubscriber.php index 4ff7dc7c8..aefa0eaae 100644 --- a/app/Listeners/UserNotificationSubscriber.php +++ b/app/Listeners/UserNotificationSubscriber.php @@ -2,7 +2,7 @@ namespace App\Listeners; -use App\Events\SpeedtestBenchmarkFailed; +use App\Events\SpeedtestBenchmarkUnhealthy; use App\Events\SpeedtestCompleted; use App\Events\SpeedtestFailed; use Filament\Actions\Action; @@ -38,7 +38,7 @@ public function handleCompleted(SpeedtestCompleted $event): void /** * Handle the event. */ - public function handleBenchmarkFailed(SpeedtestBenchmarkFailed $event): void + public function handleBenchmarkFailed(SpeedtestBenchmarkUnhealthy $event): void { $result = $event->result; @@ -97,7 +97,7 @@ public function subscribe(Dispatcher $events): array { return [ SpeedtestCompleted::class => 'handleCompleted', - SpeedtestBenchmarkFailed::class => 'handleBenchmarkFailed', + SpeedtestBenchmarkUnhealthy::class => 'handleBenchmarkFailed', SpeedtestFailed::class => 'handleFailed', ]; }