deprecate container restart
This commit is contained in:
@@ -145,7 +145,7 @@ class Composer:
|
||||
"""Sets the running status of the compose stack
|
||||
|
||||
Args:
|
||||
status: string containing "up", "down", "restart", or "recreate" corresponding to the respective running state of the composer
|
||||
status: string containing "up", "down", or "recreate" corresponding to the respective running state of the composer
|
||||
"""
|
||||
|
||||
try:
|
||||
@@ -160,10 +160,6 @@ class Composer:
|
||||
self.docker.compose.down(
|
||||
services=[self.name]
|
||||
)
|
||||
elif status == "restart":
|
||||
self.docker.compose.restart(
|
||||
services=[self.name]
|
||||
)
|
||||
elif status == "recreate":
|
||||
self.docker.compose.up(
|
||||
build=True,
|
||||
@@ -173,7 +169,7 @@ class Composer:
|
||||
remove_orphans=True
|
||||
)
|
||||
else:
|
||||
logger.warn(f"Undefined status {status} - use up, down, or restart")
|
||||
logger.warn(f"Undefined status {status} - use up, down, or recreate")
|
||||
except DockerException as error:
|
||||
logger.error(f"Setting status of composer failed: {error}")
|
||||
|
||||
@@ -248,7 +244,7 @@ class Service:
|
||||
"""Sets the running status of the service
|
||||
|
||||
Args:
|
||||
status: string containing "up", "down", "restart", or "recreate" corresponding to the respective running state of the service
|
||||
status: string containing "up", "down", or "recreate" corresponding to the respective running state of the service
|
||||
"""
|
||||
|
||||
try:
|
||||
@@ -264,10 +260,6 @@ class Service:
|
||||
self.parent.docker.compose.down(
|
||||
services=[self.name]
|
||||
)
|
||||
elif status == "restart":
|
||||
self.parent.docker.compose.restart(
|
||||
services=[self.name]
|
||||
)
|
||||
elif status == "recreate":
|
||||
self.parent.docker.compose.up(
|
||||
build=True,
|
||||
@@ -278,7 +270,7 @@ class Service:
|
||||
remove_orphans=True
|
||||
)
|
||||
else:
|
||||
logger.warn(f"Undefined status {status} - use up, down, or restart")
|
||||
logger.warn(f"Undefined status {status} - use up, down, or recreate")
|
||||
except DockerException as error:
|
||||
logger.error(f"Setting status for service {self.name} failed: {error}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user