Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users can raise RescheduleTask but TaskSets cannot? #2652

Closed
2 tasks done
bakhtos opened this issue Mar 26, 2024 · 2 comments
Closed
2 tasks done

Users can raise RescheduleTask but TaskSets cannot? #2652

bakhtos opened this issue Mar 26, 2024 · 2 comments
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it

Comments

@bakhtos
Copy link

bakhtos commented Mar 26, 2024

Prerequisites

Description

So as far as I understand, Users can raise RescheduleTask error directly in the code, but TaskSets 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 Users and TaskSets have methods e.g. self.reschedule() and self.interrupt()and RescheduleTask error is only used internally and never raised in user-written code?

@cyberw
Copy link
Collaborator

cyberw commented Mar 26, 2024

I guess? I dont really use TaskSets and have never seen the point in using them so I dont know :)

@cyberw cyberw added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label May 10, 2024
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it
Projects
None yet
Development

No branches or pull requests

2 participants