mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
correctly disable database update if it failed before
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
85b445d576
commit
2b98a936b9
2 changed files with 17 additions and 14 deletions
|
|
@ -261,19 +261,14 @@ class DockerActionManager
|
|||
|
||||
public function PullContainer(Container $container) : void
|
||||
{
|
||||
$pullcontainer = true;
|
||||
if ($container->GetIdentifier() === 'nextcloud-aio-database') {
|
||||
if ($this->GetDatabasecontainerExitCode() > 0) {
|
||||
$pullcontainer = false;
|
||||
}
|
||||
}
|
||||
if ($pullcontainer) {
|
||||
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container))));
|
||||
try {
|
||||
$this->guzzleClient->post($url);
|
||||
} catch (RequestException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container))));
|
||||
try {
|
||||
$this->guzzleClient->post($url);
|
||||
} catch (RequestException $e) {
|
||||
error_log($e->getMessage());
|
||||
// Don't exit here because it is possible that the image is already present
|
||||
// and we ran into docker hub limits.
|
||||
// We will exit later if not image should be available.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue