fix: Handle null and empty disk usage in DockerCleanupJob

This commit is contained in:
Andras Bacsai 2024-08-07 10:54:22 +02:00
parent a2150f2f7d
commit 961ba49d89

View File

@ -37,7 +37,7 @@ public function handle(): void
}
$this->usageBefore = $this->server->getDiskUsage();
if ($this->usageBefore === null) {
if (str($this->usageBefore)->isEmpty() || $this->usageBefore === null || $this->usageBefore === 0) {
Log::info('DockerCleanupJob force cleanup on '.$this->server->name);
CleanupDocker::run(server: $this->server, force: true);