You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys I've created a custom client that does a HTTP request, and after I need to parse the response.
If the response falls into a certain condition (let's say, I get a 404 response for example) I want to stop the test immediatly.
It does work perfectly for when I'm running locally, but when I run it distributed, I can stop the slave nodes, but the master node keeps running until the specified time is reached
For example, consider the code below:
@task
def my_task(self):
response = self.client.my_request()
is_condition_met = parse_response(response)
# Condition met, stop the test
if is_condition_met:
if isinstance(runners.locust_runner, LocalLocustRunner):
# This part works just fine
runners.locust_runner.quit()
if isinstance(runners.locust_runner, SlavelLocustRunner):
# Probably here I need to do something to tell the master node that I want to stop the test, but how?
runners.locust_runner.quit()
I don't know if this is the best approch for my case, maybe the master node needs to be responsible for stopping the test, but how to do that?
I'm open to suggestions, I hope you guys can help me, thanks in advance.
The text was updated successfully, but these errors were encountered:
I don't see an issue here. All I see is a statement and a question asking for suggestions... nothing points to a concrete bug/problem with Locust. I agree there could be an interesting discussion around this topic, but this Issue tracker is not intended for questions and discussion.
Hey guys I've created a custom client that does a HTTP request, and after I need to parse the response.
If the response falls into a certain condition (let's say, I get a 404 response for example) I want to stop the test immediatly.
It does work perfectly for when I'm running locally, but when I run it distributed, I can stop the slave nodes, but the master node keeps running until the specified time is reached
For example, consider the code below:
I don't know if this is the best approch for my case, maybe the master node needs to be responsible for stopping the test, but how to do that?
I'm open to suggestions, I hope you guys can help me, thanks in advance.
The text was updated successfully, but these errors were encountered: