Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Question: Wait instead of cancelling if it is executing? #655

Closed
james-em opened this issue Nov 15, 2021 · 0 comments
Closed

Question: Wait instead of cancelling if it is executing? #655

james-em opened this issue Nov 15, 2021 · 0 comments

Comments

@james-em
Copy link

james-em commented Nov 15, 2021

Hi,

I am sorry in advance if it is inappropriate to ask questions here. I was wondering if anyone could point me in the right direction to create this behavior:

Let's say I queue MyJob(param=123). I cannot re-queue MyJob(param=123) until it is executing(in-progress). (Behavior of until_executing). The edge case here is while MyJob(param=123) is executing, it should be able to queue again the same job, but it should wait until the first MyJob(param=123) is done before running the second instance with the same param.

According to the doc, there is a on_conflict: :reschedule, however it's not exactly this behavior I am looking for. The correct behavior would be :

:reject if job with same param is already queued
:reschedule if job with same param is running and there is not another one in the queue.

Thanks in advance :)

Repository owner locked and limited conversation to collaborators Nov 15, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants