mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
Add Enum
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
This commit is contained in:
parent
a54cfed53d
commit
a0ec043c49
16 changed files with 60 additions and 104 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace AIO\Controller;
|
||||
|
||||
use AIO\Container\State\RunningState;
|
||||
use AIO\Container\WorkingState;
|
||||
use AIO\ContainerDefinitionFetcher;
|
||||
use AIO\Docker\DockerActionManager;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
|
|
@ -28,7 +28,7 @@ readonly class DockerController {
|
|||
|
||||
// Don't start if container is already running
|
||||
// This is expected to happen if a container is defined in depends_on of multiple containers
|
||||
if ($container->GetRunningState() instanceof RunningState) {
|
||||
if ($container->GetRunningState() === WorkingState::Running) {
|
||||
error_log('Not starting ' . $id . ' because it was already started.');
|
||||
return;
|
||||
}
|
||||
|
|
@ -254,10 +254,10 @@ readonly class DockerController {
|
|||
$domaincheckContainer = $this->containerDefinitionFetcher->GetContainerById($id);
|
||||
$apacheContainer = $this->containerDefinitionFetcher->GetContainerById(self::TOP_CONTAINER);
|
||||
// Don't start if apache is already running
|
||||
if ($apacheContainer->GetRunningState() instanceof RunningState) {
|
||||
if ($apacheContainer->GetRunningState() === WorkingState::Running) {
|
||||
return;
|
||||
// Don't start if domaincheck is already running
|
||||
} elseif ($domaincheckContainer->GetRunningState() instanceof RunningState) {
|
||||
} elseif ($domaincheckContainer->GetRunningState() === WorkingState::Running) {
|
||||
$domaincheckWasStarted = apcu_fetch($cacheKey);
|
||||
// Start domaincheck again when 10 minutes are over by not returning here
|
||||
if($domaincheckWasStarted !== false && is_string($domaincheckWasStarted)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue