From 8167fad5ec57f2cca1b1f99c289f4f97a3216eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Thu, 28 Oct 2021 19:12:55 +0200 Subject: [PATCH] Tweak comments --- src/runboat/controller.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runboat/controller.py b/src/runboat/controller.py index 426b932..792e067 100644 --- a/src/runboat/controller.py +++ b/src/runboat/controller.py @@ -90,7 +90,7 @@ class Controller: break # no capacity for now, back to sleep to_start = self.db.to_start(limit=can_start) if not to_start: - break + break # nothing startable, back to sleep _logger.info(f"Starting {len(to_start)} builds of up to {can_start}.") for build in to_start: await build.scale(1) @@ -103,10 +103,10 @@ class Controller: while True: can_stop = self.running - self.max_running if can_stop <= 0: - break # nothing to top for now, back to sleep + break # no need to stop for now, back to sleep to_stop = self.db.oldest_started(limit=can_stop) if not to_stop: - break + break # nothing stoppable, back to sleep _logger.info(f"Stopping {len(to_stop)} builds of up to {can_stop}.") for build in to_stop: await build.scale(0) @@ -119,10 +119,10 @@ class Controller: while True: can_undeploy = self.deployed - self.max_deployed if can_undeploy <= 0: - break # nothing to undeploy for now, back to sleep + break # no need to undeploy for now, back to sleep to_undeploy = self.db.oldest_stopped(limit=can_undeploy) if not to_undeploy: - break + break # nothing undeployable, back to sleep _logger.info( f"Undeploying {len(to_undeploy)} builds of up to {can_undeploy}." )