-
Notifications
You must be signed in to change notification settings - Fork 157
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 deprecated uses of Redis#pipelined
#438
Conversation
Context: redis/redis-rb#1059 The following is deprecated ```ruby redis.pipelined do redis.get(key) end ``` And should be rewritten as: ```ruby redis.pipelined do |pipeline| pipeline.get(key) end ``` Functionally it makes no difference. This API is available since Redis 3.0.
files_set.map do |key| | ||
@redis.hgetall(key) | ||
@redis.pipelined { |pipeline| | ||
files_set.each do |key| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason the map
moved to an each
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes because the return value doesn't matter. pipelined
doesn't care about what the block returns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotch, yep all seems good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged thanks
@danmayer You said merged, but you only approved. Not sure if you realized that. |
oops sorry merged... I will try to get a release out in the next day or two @natematykiewicz / @casperisfine |
No big deal It's just a warning and people have a flag to silence them. |
OK, sorry for the delay, this has been released in 5.2.2 |
Context: redis/redis-rb#1059
The following is deprecated
And should be rewritten as:
Functionally it makes no difference.
This API is available since Redis 3.0.