mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00
Use ContainerStatus::tryFrom
in ProcessScheduleService
(#1101)
This commit is contained in:
parent
0051370f24
commit
d452e3d2f2
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user