From 5f8dac82358a35dc1d41e69e8274904aa22033ad Mon Sep 17 00:00:00 2001 From: craisin Date: Thu, 1 Jan 2026 18:03:02 -0800 Subject: [PATCH] refactor status --- composer/agent.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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