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

Fix script manager lock key #46

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Fix script manager lock key #46

merged 2 commits into from
Sep 29, 2023

Conversation

guille-sage
Copy link
Contributor

Description

mysql_framework depends on redlock, without any version restriction.

However, starting with 2.0.0, redlock changed its implementation to use the gem redis-client, which does not allow passing in a Class type as a locking key.

This commit addresses this by using the class name instead. The previous redis implementation was calling #to_s on the argument, so the end result is the same.

Relevant links

mysql_framework depends on `redlock`, without any version restriction.

However, starting with 2.0.0, `redlock` changed its implementation
to use the gem `redis-client`, which does not allow passing in a
`Class` type as a locking key.

This commit addresses this by using the class name instead. The previous
`redis` implementation was calling `#to_s` on the argument, so the end
result is the same.
@guille-sage guille-sage self-assigned this Sep 29, 2023
@codeclimate
Copy link

codeclimate bot commented Sep 29, 2023

Code Climate has analyzed commit eaf97fa and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

@guille-sage guille-sage merged commit 25ced0a into master Sep 29, 2023
1 check passed
@guille-sage guille-sage deleted the fix_redlock_compat branch September 29, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants