From 2dd17cfac5fa2f1502878298eccd041f0c823684 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 28 Jun 2024 12:03:38 +0200 Subject: [PATCH] fix: force cleanup on busy servers --- app/Jobs/DockerCleanupJob.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Jobs/DockerCleanupJob.php b/app/Jobs/DockerCleanupJob.php index e637fb6d4..e42caeead 100644 --- a/app/Jobs/DockerCleanupJob.php +++ b/app/Jobs/DockerCleanupJob.php @@ -22,7 +22,9 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueue public ?int $usageBefore = null; - public function __construct(public Server $server) {} + public function __construct(public Server $server) + { + } public function handle(): void { @@ -35,9 +37,9 @@ public function handle(): void return; } }); - if ($isInprogress) { - throw new RuntimeException('DockerCleanupJob: ApplicationDeploymentQueue is not empty, skipping...'); - } + // if ($isInprogress) { + // throw new RuntimeException('DockerCleanupJob: ApplicationDeploymentQueue is not empty, skipping...'); + // } if (! $this->server->isFunctional()) { return; }