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

redis gem has sort of deprecated redis.pipelined #1794

Closed
danlo opened this issue Mar 13, 2022 · 9 comments
Closed

redis gem has sort of deprecated redis.pipelined #1794

danlo opened this issue Mar 13, 2022 · 9 comments

Comments

@danlo
Copy link
Contributor

danlo commented Mar 13, 2022

Greetings,

The redis gem is now deprecating the usage of redis.pipelined w/o a block being passed to it

Here is the warning: from this line of code:
https://github.com/redis/redis-rb/blob/master/lib/redis/pipeline.rb#L56

Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.pipelined do
  redis.get("key")
end

should be replaced by

redis.pipelined do |pipeline|
  pipeline.get("key")
end

(called from .../redis-namespace-1.8.2/lib/redis/namespace.rb:530:in `namespaced_block'}

The resque code has the following usages of pipelined:

lib/resque.rb:    sizes = redis.pipelined do
lib/resque.rb:    samples = redis.pipelined do
lib/resque/data_store.rb:        @redis.pipelined do
... (several more)...

Thank you!

-daniel

I would try and fix this as it seams simple, however, I'm not confident in my ruby multithreading skills to attempt to create a fix that would work for everyone. (Sorry!)

@danlo danlo changed the title redis-namespace has deprecated redis.pipelined (sort of). redis-namespace has deprecated redis.pipelined Mar 13, 2022
@danlo danlo changed the title redis-namespace has deprecated redis.pipelined redis gem has deprecated redis.pipelined Mar 13, 2022
@danlo danlo changed the title redis gem has deprecated redis.pipelined redis gem has sort of deprecated redis.pipelined Mar 13, 2022
@jrochkind
Copy link
Contributor

This isn't "sort of", this is deprecated, right?

These all over my logs are kind of annoying!

It looks like there's already an open PR. Are there any active maintainers who might want to assist on this? @iloveitaly ?

@matthieubrau
Copy link

Hello,
There is a PR but nobody to merge it ?
#1796

@jrochkind
Copy link
Contributor

Note for anyone else arriving here annoyed at the deprecation notices, @morenocarullo helpfully pointed out you can silence them with:

Redis.silence_deprecations = true 

In an initializer

Of course, resque will be incompatible with a future version of redis gem unless deprecations are fixed! (note that in "will be removed in Redis 5.0.0.", that means future redis gem release 5.0.0, not the redis software itself, which is already on 6.0).

@atruskie
Copy link

I think this was covered by #1806

atruskie added a commit to QutEcoacoustics/baw-server that referenced this issue Jun 27, 2022
@anacarolinacastro
Copy link

Do you have a prediction date for the new gem version release?

@iloveitaly
Copy link
Contributor

@anacarolinacastro not yet! Unfortunately my time is limited to work on this. Sponsoring me would help me allocate more time here :)

@anacarolinacastro
Copy link

hi @iloveitaly

I totally understand your situation, our paid work is our priority! I will wait for the release, no problem.

Thanks!

@mishina2228
Copy link
Contributor

@danlo (Cc: @PatrickTulskie, @iloveitaly)
resque v2.3.0 (the latest is v2.4.0), which address this issue, has already been released.
So I believe we can close this issue (like resque/resque-scheduler#745).

@PatrickTulskie
Copy link
Contributor

@mishina2228 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants