Closed bakhtos closed 5 months ago
I guess? I dont really use TaskSets and have never seen the point in using them so I dont know :)
This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!
Prerequisites
Description
So as far as I understand,
User
s can raiseRescheduleTask
error directly in the code, butTaskSet
s use this error internally so inside aTaskSet
task one needs to useself.interrupt()
, otherwise raisingRescheduleTask
causes unexpected behaviour?I had an issue with my code where I first implemented some tasks directly inside a
User
instance and they raisedRescheduleTask
error, but then I refactored the code so that the tasks are inside aTaskSet
, 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 ofraise RescheduleTask()
withself.interrupt()
.Should the interface be somehow unified so that both
User
s andTaskSet
s have methods e.g.self.reschedule()
andself.interrupt()
andRescheduleTask
error is only used internally and never raised in user-written code?