Users can raise RescheduleTask
but TaskSets cannot?
#2652
Labels
feature request
stale
Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it
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?The text was updated successfully, but these errors were encountered: