Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't log state change if it's the same #1580

Merged
merged 4 commits into from
Sep 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def update_state(self, new_state):
"""
Updates the current state
"""
logger.debug("Updating state to %s, old state was %s" % (new_state, self.state))
logger.debug("Updating state to '%s', old state was '%s'" % (new_state, self.state))
self.state = new_state

def cpu_log_warning(self):
Expand Down Expand Up @@ -618,8 +618,10 @@ def quit(self):
self.greenlet.kill(block=True)

def check_stopped(self):
if not self.state == STATE_INIT and all(
map(lambda x: x.state != STATE_RUNNING and x.state != STATE_SPAWNING, self.clients.all)
if (
not self.state == STATE_INIT
and not self.state == STATE_STOPPED
and all(map(lambda x: x.state != STATE_RUNNING and x.state != STATE_SPAWNING, self.clients.all))
):
self.update_state(STATE_STOPPED)

Expand Down