avoid unnecessary rebuid of container
This commit is contained in:
parent
e06121e055
commit
668cc936e4
|
@ -123,7 +123,7 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
|
||||||
if cid `elem` l
|
if cid `elem` l
|
||||||
then do
|
then do
|
||||||
runningident <- getrunningident
|
runningident <- getrunningident
|
||||||
if runningident == Just ident
|
if ident2id <$> runningident == Just (ident2id ident)
|
||||||
then return NoChange
|
then return NoChange
|
||||||
else do
|
else do
|
||||||
void $ stopContainer cid
|
void $ stopContainer cid
|
||||||
|
@ -162,6 +162,9 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
|
||||||
data ContainerIdent = ContainerIdent Image HostName ContainerName [RunParam]
|
data ContainerIdent = ContainerIdent Image HostName ContainerName [RunParam]
|
||||||
deriving (Read, Show, Eq)
|
deriving (Read, Show, Eq)
|
||||||
|
|
||||||
|
ident2id :: ContainerIdent -> ContainerId
|
||||||
|
ident2id (ContainerIdent _ hn cn _) = ContainerId hn cn
|
||||||
|
|
||||||
-- | The ContainerIdent of a container is written to
|
-- | The ContainerIdent of a container is written to
|
||||||
-- /.propellor-ident inside it. This can be checked to see if
|
-- /.propellor-ident inside it. This can be checked to see if
|
||||||
-- the container has the same ident later.
|
-- the container has the same ident later.
|
||||||
|
|
Loading…
Reference in New Issue