Skip to content

Commit

Permalink
Shorter log lines for workers connecting/stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Sep 28, 2024
1 parent 276fa48 commit a5fb6d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def client_listener(self) -> NoReturn:
# TODO: Test this situation
self.start(self.target_user_count, self.spawn_rate)
logger.info(
f"Worker {client_id} (index {self.get_worker_index(client_id)}) reported as ready. {len(self.clients.ready + self.clients.running + self.clients.spawning)} workers connected."
f"{client_id} (index {self.get_worker_index(client_id)}) reported as ready. {len(self.clients.ready + self.clients.running + self.clients.spawning)} workers connected."
)
if self.rebalancing_enabled() and self.state == STATE_RUNNING and self.spawning_completed:
self.start(self.target_user_count, self.spawn_rate)
Expand Down Expand Up @@ -1079,9 +1079,7 @@ def client_listener(self) -> NoReturn:
if not self._users_dispatcher.dispatch_in_progress and self.state == STATE_RUNNING:
# TODO: Test this situation
self.start(self.target_user_count, self.spawn_rate)
logger.info(
f"Worker {msg.node_id} (index {self.get_worker_index(client_id)}) reported that it has stopped, removing from running workers"
)
logger.info(f"{msg.node_id} (index {self.get_worker_index(client_id)}) reported that it has stopped")
elif msg.type == "heartbeat":
if msg.node_id in self.clients:
c = self.clients[msg.node_id]
Expand Down

0 comments on commit a5fb6d8

Please sign in to comment.