From 00bf18c22590c412aaa32988433d18be42fa1264 Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" Date: Mon, 7 Mar 2022 17:55:30 +0300 Subject: [PATCH] Fix Cron Deleting Paused Pireps (#1434) --- app/Cron/Hourly/RemoveExpiredLiveFlights.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Cron/Hourly/RemoveExpiredLiveFlights.php b/app/Cron/Hourly/RemoveExpiredLiveFlights.php index 6fee759e..267c7b57 100644 --- a/app/Cron/Hourly/RemoveExpiredLiveFlights.php +++ b/app/Cron/Hourly/RemoveExpiredLiveFlights.php @@ -6,6 +6,7 @@ use App\Contracts\Listener; use App\Events\CronHourly; use App\Events\PirepCancelled; use App\Models\Enums\PirepState; +use App\Models\Enums\PirepStatus; use App\Models\Pirep; use Carbon\Carbon; use Illuminate\Support\Facades\Log; @@ -31,6 +32,7 @@ class RemoveExpiredLiveFlights extends Listener $date = Carbon::now('UTC')->subHours(setting('acars.live_time')); $pireps = Pirep::where('updated_at', '<', $date) ->where('state', PirepState::IN_PROGRESS) + ->where('status', '<>', PirepStatus::PAUSED) ->get(); foreach ($pireps as $pirep) {