Skip to content

Add lock to item when lock_type is pulled from Job class sidekiq options#786

Merged
mhenrixon merged 2 commits intomhenrixon:mainfrom
ttstarck:logging_context_bug_with_jobs_not_queued_with_lock
May 27, 2023
Merged

Add lock to item when lock_type is pulled from Job class sidekiq options#786
mhenrixon merged 2 commits intomhenrixon:mainfrom
ttstarck:logging_context_bug_with_jobs_not_queued_with_lock

Conversation

@ttstarck
Copy link
Copy Markdown
Contributor

For jobs that are queued without the lock options, to a Job class that has `lock` option set in the `sidekiq_options` will still go through the SidekiqUniqueJobs server middleware, but won't have `lock` set on the item the entire time.
This doesn't seem to be affecting the locking or unlocking of jobs, however it is affecting the logging_context because the Middleware LogContext expects the item[LOCK] to have a value.
@ttstarck ttstarck force-pushed the logging_context_bug_with_jobs_not_queued_with_lock branch from 99c8610 to cfe59ea Compare May 26, 2023 23:24
Copy link
Copy Markdown
Owner

@mhenrixon mhenrixon left a comment

Choose a reason for hiding this comment

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

Brilliant! Thank you for your contribution.

@mhenrixon mhenrixon merged commit f381562 into mhenrixon:main May 27, 2023
@ttstarck ttstarck deleted the logging_context_bug_with_jobs_not_queued_with_lock branch May 28, 2023 20:47
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