From 2a718bbcec0bab297317e058be907cc2be561f07 Mon Sep 17 00:00:00 2001 From: Sven van Ginkel Date: Sat, 23 Nov 2024 22:36:30 +0100 Subject: [PATCH] Fix db colunm and cancel job --- app/Jobs/Ookla/CompleteSpeedtestJob.php | 4 ++++ app/Jobs/SkipSpeedtestJob.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Ookla/CompleteSpeedtestJob.php b/app/Jobs/Ookla/CompleteSpeedtestJob.php index 4e8c73d0a..f34dbff2b 100644 --- a/app/Jobs/Ookla/CompleteSpeedtestJob.php +++ b/app/Jobs/Ookla/CompleteSpeedtestJob.php @@ -25,6 +25,10 @@ public function __construct( */ public function handle(): void { + if ($this->batch()->cancelled()) { + return; + } + $this->result->update([ 'status' => ResultStatus::Completed, ]); diff --git a/app/Jobs/SkipSpeedtestJob.php b/app/Jobs/SkipSpeedtestJob.php index 1b3927bfa..e516bac9f 100644 --- a/app/Jobs/SkipSpeedtestJob.php +++ b/app/Jobs/SkipSpeedtestJob.php @@ -52,7 +52,7 @@ public function handle(): void 'data->type' => 'log', 'data->level' => 'error', 'data->message' => $shouldSkip, - 'interface->externalIp' => $externalIp, + 'data->interface->externalIp' => $externalIp, 'status' => ResultStatus::Skipped, ]);