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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow locksmith delete to work with strings #615

Merged
merged 1 commit into from
Jun 29, 2021
Merged

Allow locksmith delete to work with strings #615

merged 1 commit into from
Jun 29, 2021

Conversation

pinkahd
Copy link
Contributor

@pinkahd pinkahd commented Jun 29, 2021

Hello 馃憢馃徏

Thank you for all the work you've put into the gem 馃檱馃徏

We've noticed an error when we've update to version 7.x of the gem (currently were on 7.0.12), it looks like the delete script returns a string. To give a bit more context we're using Sidekiq 5.2.x and Redis 3.2.x those might have an influence over the reason why we're seeing a string been returned.

Anyway I think it would be beneficial if .to_i was called on the output of call_script. It could also be that we're doing something else wrong 鈥斅營'm happy to share more config about our setup.

Let me know if this is something that can be added upstream or it's just an error with our configuration.


Commit message

Previously if call_script(:delete) was returning a string an
error was raised since we couldn't call .positive? on it.

This change will ensure call script will always return a number.

Previously if `call_script(:delete)` was returning a string an
error was raised since we couldn't call `.positive?` on it.

This change will ensure call script will always return a number.
@mhenrixon mhenrixon merged commit 2a588a6 into mhenrixon:master Jun 29, 2021
@pinkahd pinkahd deleted the fix-calling-positive-on-a-string branch June 29, 2021 10:34
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