-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
How :until_executing works ? Run job only once and discard new jobs while another job is executing #226
Comments
Hi, I'm just trying to get my head around all the different lock types myself. :) It looks like you are looking for |
I don't what to just maintain the lock until the job is successfully executed. I want all other jobs to be dropped and never executed if these jobs are added while the first job is executing. It is confusing in documentation about :until_executing Do you have any mechanism to skip (drop/delete) job? Or a job will be executed in any cases, only the time of running the job depends on locks ? |
@maxivak with |
I've clarified this a little better in the README. Will close this issue now but just ping me if you have any further questions. |
I have this worker with :until_executing option
and I run task multiple times
I expect that the job will run only once since it is a long job (see sleep for 2 min) and two other jobs will be dropped.
Documentation says this about :until_executing
"Any jobs added until the first one of the same arguments has been unlocked will just be dropped."
So I expect while job1 is running and I add job2 and job3 - these jobs would be dropped and never executed.
But I see in Sidekiq log that all three job are executing:
How to make new jobs dropped while the first job is executing?
The text was updated successfully, but these errors were encountered: