fix: force cleanup on busy servers

This commit is contained in:
Andras Bacsai 2024-06-28 12:03:38 +02:00
parent 93d04ef426
commit 2dd17cfac5

View File

@ -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;
}