Closed xrmx closed 7 years ago
What is it that you want to happen when it fails in on_start?
My memory is a bit foggy on the topic, anyway i think consider the creation of the locust instance as failed but continue with the hatch of the others.
I see. That's not something that is currently supported and unless there's a strong use-case for it, I don't think it's something that will be implemented in Locust.
However, I guess the result in your case was that the failed locust instances stopped, but the ones that didn't failed continued to execute. Which might be sort of equivalent of having some kind of failed state (even though the logs were filled with stacktraces)?
Ping in 2024. My use case is that I want the Locust user to abort if authentication fails because all subsequent calls by that user will fail due to auth errors.
I call a function that may fail in TaskSet.on_start
I've added a self.interrupt(reschedule=False) call if the function fail but the docstring of the that method says i should not do that from the root taskset.
And in fact i got these errors logged:
How can i avoid to run a task i know would return an error?