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.
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.