Skip to content

Removing deprecated sidekiq methods#44

Open
cindysx89 wants to merge 4 commits intomainfrom
fixing-after-unlock
Open

Removing deprecated sidekiq methods#44
cindysx89 wants to merge 4 commits intomainfrom
fixing-after-unlock

Conversation

@cindysx89
Copy link
Contributor

@cindysx89 cindysx89 commented Jul 16, 2025

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:

  • change sidekiq workers from 2 back down to 1
  • bump up time for SYNC_DB_EVENTS_FREQUENCY_MINS from 1 minute to 5 minutes

@Tim-Langford Tim-Langford requested a review from duknic July 17, 2025 10:16
unique: :until_executed,
unique_args: :unique_args,
lock_expiration: (1 * 60 * 60) # 1 hour
lock: :until_executed,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@duknic duknic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍟

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.

2 participants