fix(docker): log failed cleanup attempts when server is not functional
This commit is contained in:
parent
069bf4cc82
commit
f0ed05b399
1 changed files with 10 additions and 4 deletions
|
|
@ -46,14 +46,20 @@ public function __construct(
|
|||
public function handle(): void
|
||||
{
|
||||
try {
|
||||
if (! $this->server->isFunctional()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->execution_log = DockerCleanupExecution::create([
|
||||
'server_id' => $this->server->id,
|
||||
]);
|
||||
|
||||
if (! $this->server->isFunctional()) {
|
||||
$this->execution_log->update([
|
||||
'status' => 'failed',
|
||||
'message' => 'Server is not functional (unreachable, unusable, or disabled)',
|
||||
'finished_at' => Carbon::now()->toImmutable(),
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->usageBefore = $this->server->getDiskUsage();
|
||||
|
||||
if ($this->manualCleanup || $this->server->settings->force_docker_cleanup) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue