From d452e3d2f2c3fb0ec5656fb26b35b03d65ef3bd8 Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> Date: Sun, 16 Mar 2025 15:36:15 +0100 Subject: [PATCH] Use `ContainerStatus::tryFrom` in `ProcessScheduleService` (#1101) --- app/Services/Schedules/ProcessScheduleService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Schedules/ProcessScheduleService.php b/app/Services/Schedules/ProcessScheduleService.php index b8cb81df0..2df382db0 100644 --- a/app/Services/Schedules/ProcessScheduleService.php +++ b/app/Services/Schedules/ProcessScheduleService.php @@ -42,7 +42,7 @@ class ProcessScheduleService // Check that the server is currently in a starting or running state before executing // this schedule if this option has been set. try { - $state = fluent($this->serverRepository->setServer($schedule->server)->getDetails())->get('state') ?? ContainerStatus::Offline; + $state = ContainerStatus::tryFrom(fluent($this->serverRepository->setServer($schedule->server)->getDetails())->get('state')) ?? ContainerStatus::Offline; // If the server is stopping or offline just do nothing with this task. if ($state->isOffline()) {