mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
improve update handling when changing channels
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
18b3c76a67
commit
d2cadf6b9f
2 changed files with 4 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ class DockerActionManager
|
||||||
$runningDigest = $this->GetRepoDigestOfContainer($container->GetIdentifier());
|
$runningDigest = $this->GetRepoDigestOfContainer($container->GetIdentifier());
|
||||||
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
|
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
|
||||||
|
|
||||||
if ($runningDigest === $remoteDigest || $remoteDigest === null || $runningDigest === null) {
|
if ($runningDigest === $remoteDigest || $remoteDigest === null) {
|
||||||
return new VersionEqualState();
|
return new VersionEqualState();
|
||||||
} else {
|
} else {
|
||||||
return new VersionDifferentState();
|
return new VersionDifferentState();
|
||||||
|
|
@ -375,7 +375,6 @@ class DockerActionManager
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
error_log('Could not get digest of container ' . $this->BuildApiUrl($containerName) . ' ' . $e->getMessage());
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -413,7 +412,7 @@ class DockerActionManager
|
||||||
$runningDigest = $this->GetRepoDigestOfContainer($containerName);
|
$runningDigest = $this->GetRepoDigestOfContainer($containerName);
|
||||||
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
|
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
|
||||||
|
|
||||||
if ($remoteDigest === $runningDigest || $remoteDigest === null || $runningDigest === null) {
|
if ($remoteDigest === $runningDigest || $remoteDigest === null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,10 @@ class DockerHubManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_log('Could not get digest of container ' . $name . ':' . $tag);
|
||||||
return null;
|
return null;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
error_log('Could not get digest of container ' . $name . ':' . $tag . ' ' . $e->getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue