diff --git a/composer/agent.py b/composer/agent.py index 961f817..f1116f4 100644 --- a/composer/agent.py +++ b/composer/agent.py @@ -214,16 +214,6 @@ class Service: if self.update_time is None: return None schedule.cancel_job(self._update_task) - - def get_status(self): - - """Gets the running status of the service - - Returns: - "up" or "down" depending on the running status of the service - """ - - return "up" if bool(self.parent.docker.compose.ps(services=[self.name])) else "down" def start_update_job(self): @@ -293,4 +283,5 @@ class Service: services=[self.name] ) logger.info(f"Updated service {self.name}") - self.set_status(self.get_status()) \ No newline at end of file + status = "up" if bool(self.parent.docker.compose.ps(services=[self.name])) else "down" + self.set_status(status) \ No newline at end of file