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

Fixing reschedule when using a non default queue #679

Merged
merged 3 commits into from
Feb 5, 2022

Conversation

bigzed
Copy link
Contributor

@bigzed bigzed commented Jan 27, 2022

When a job uses a non default queue in it's sidekiq_options, the on_conflict strategy still enqueues the job into the default queue even though, the queue information is available in item.

The MR fixes this by calling set(queue: item['queue'].to_sym) before perform_in in reschedule. It assumes that item always contains queue.

@mhenrixon
Copy link
Owner

mhenrixon commented Feb 3, 2022

Hi @bigzed this was a complete oversight by me! Of course, the job should be put on the queue it belongs to.

Could you rebase/merge the main branch and I'll get this released with the next version! Oh, and also, the rubocop issue would be great to address as well.

I noticed, that when I use the `on_conflict` strategy `:reschedule` with a job, that has a
`until_and_while_executing` lock and is configured to run on a specific
queue,(e.g. `no_default`). `:reschedule` tries to enqueue it into the
`default` queue.
The commit lets `:reschedule` honour the queue.
@bigzed
Copy link
Contributor Author

bigzed commented Feb 4, 2022

Hello @mhenrixon, the branch is rebased to main and the Rubocop offenses are fixed.
Thanks for including it!

@mhenrixon mhenrixon merged commit 7947c60 into mhenrixon:main Feb 5, 2022
@mhenrixon
Copy link
Owner

Released as v7.1.15 @bigzed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants