Skip to content

Allow locksmith delete to work with strings#615

Merged
mhenrixon merged 1 commit intomhenrixon:masterfrom
mubi:fix-calling-positive-on-a-string
Jun 29, 2021
Merged

Allow locksmith delete to work with strings#615
mhenrixon merged 1 commit intomhenrixon:masterfrom
mubi:fix-calling-positive-on-a-string

Conversation

@pinkahd
Copy link
Copy Markdown
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 — I'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.

2 participants