Description
Prerequisites
- I am using the latest version of Locust
- I am suggesting a new feature, not asking a question
Description
So as far as I understand, User
s can raise RescheduleTask
error directly in the code, but TaskSet
s use this error internally so inside a TaskSet
task one needs to use self.interrupt()
, otherwise raising RescheduleTask
causes unexpected behaviour?
I had an issue with my code where I first implemented some tasks directly inside a User
instance and they raised RescheduleTask
error, but then I refactored the code so that the tasks are inside a TaskSet
, and there was unexpected behaviour with these tasks (locust
seemed to be stuck inside one as soon as it was executed) until I replaced all instances of raise RescheduleTask()
with self.interrupt()
.
Should the interface be somehow unified so that both User
s and TaskSet
s have methods e.g. self.reschedule()
and self.interrupt()
and RescheduleTask
error is only used internally and never raised in user-written code?