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

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

Conversation

ttstarck
Copy link
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
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
8 checks passed
@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.

None yet

2 participants