Open
Conversation
…ekiq workers to be compatible with sidekiq_unique_jobs v8
duknic
reviewed
Jul 21, 2025
| unique: :until_executed, | ||
| unique_args: :unique_args, | ||
| lock_expiration: (1 * 60 * 60) # 1 hour | ||
| lock: :until_executed, |
Contributor
There was a problem hiding this comment.
You are totally correct to update these config property names. The unique_args and lock_expiration names we are using are deprecated but it does seems like from the code that they should still be working:
unique_args deprecated but not removed
lock_expiration deprecated but not removed
However, after poking around in that library code I couldn't confirm if the unique name was still backwards compatible (even though I was half expecting it would be 🤔). It appears in this map of deprecated keys but I can't see it being used as anywhere as a fallback to the newer lock name (see my search here). This could be the reason for the worker behaving differently! Nice find
logging jid and putting back a comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-writing sidekiq jobs to use sidekiq_unique_jobs v.8 syntax
https://www.rubydoc.info/gems/sidekiq-unique-jobs/SidekiqUniqueJobs/Changelog
https://github.com/mhenrixon/sidekiq-unique-jobs?tab=readme-ov-file#until-executed
Why do we need to do this?
Currently, I think some sidekiq jobs are unable to unlock itself so it never finishes syncing certain tables. Since the drift between the source and destination table is so great, its stuck in a rewind loop.
POST DEPLOYMENT: