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

Stringify on_conflict hash in Job prepare method #507

Merged
merged 1 commit into from
May 21, 2020

Conversation

jasonbekolay
Copy link
Contributor

Unfortunately my PR yesterday did not resolve the issue. While we did correct worker_options, it turns out that in the client it doesn't follow that code path when there's a conflict. My apologies for missing the mark, I didn't test thoroughly enough.

I was able to determine the root cause of the issue. The job_hash is stringified by Sidekiq.default_worker_options, and it's just a shallow stringify. That means the on_conflict hash still has symbols for keys by the time it gets to find_strategy.

The approach I took to resolve is to stringify the hash in Job#prepare. I'm happy to change or tweak the approach on your advice.

Thanks for your time recently and the quick release! Hopefully this change fixes this issue for good.

@mhenrixon mhenrixon merged commit f96a34d into mhenrixon:master May 21, 2020
@mhenrixon
Copy link
Owner

Released as v7.0.0.beta18!

@jasonbekolay
Copy link
Contributor Author

Thanks for the quick attention and release! Currently running in production and it looks good so far!

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

Successfully merging this pull request may close these issues.

None yet

2 participants