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

Consider job end in threshold throttling #104

Open
philippevezina opened this issue Nov 19, 2021 · 1 comment
Open

Consider job end in threshold throttling #104

philippevezina opened this issue Nov 19, 2021 · 1 comment
Labels
enhancement help wanted Contributions are highly appreciated

Comments

@philippevezina
Copy link

Currently, using the threshold strategy, the throttling is based on when the job is picked up by the worker. It doesn't take into consideration whether the job is actually done.

In many cases, this is not problematic, but if you want a very precise throttling (ex. for API calls) this could be more important. Let's say that I have a job that I want to throttle to 1 per second, but 1 job ends up taking 5 seconds, I could easily end up with 2 jobs executing at the same time.

I would be interested in having the threshold time apply only at the end of job and not when it is picked up.

I might need this for a project so I would be willing to work on this if the interest is here.

I would also like people's input on whether this should be the standard behaviour or rather an option.

@philippevezina philippevezina changed the title Consider job end in threshold throttling Consider job end in threshold throttling Nov 19, 2021
@philippevezina philippevezina changed the title Consider job end in threshold throttling Consider job end in threshold throttling Nov 19, 2021
@ixti
Copy link
Owner

ixti commented May 30, 2023

I'm open to suggestions.

@ixti ixti added enhancement help wanted Contributions are highly appreciated labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Contributions are highly appreciated
Projects
None yet
Development

No branches or pull requests

2 participants