improve is_backup_container_running check

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-03-30 17:50:09 +02:00
parent 3e5ab69512
commit e3826f85b9
3 changed files with 28 additions and 19 deletions

View file

@ -600,4 +600,13 @@ class DockerActionManager
}
return true;
}
public function isBackupContainerRunning() : bool {
$id = 'nextcloud-aio-borgbackup';
$backupContainer = $this->containerDefinitionFetcher->GetContainerById($id);
if ($this->GetContainerRunningState($backupContainer) instanceof RunningState) {
return true;
}
return false;
}
}