Allow locksmith delete to work with strings #615
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofcall_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 anerror was raised since we couldn't call
.positive?
on it.This change will ensure call script will always return a number.