-
Notifications
You must be signed in to change notification settings - Fork 1k
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
LMPOP not working #1237
Comments
Possible workaround: redis.lpop(:numbers) || redis.lpop(:letters) |
What's your redis server version? You can check it with |
redis.info["redis_version"] # => "6.2.6" |
LMPOP was added in 7.0, your Redis server is too old: https://redis.io/commands/lmpop/ |
Thanks for pointing me to the problem, I was able to update the Redis server and this started working. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am working with Redis to build some queues and would like to have a primary and secondary queue / lists. LMPOP feels like the right method to be using to get values from the primary list first and the secondary only providing values when the primary list is exhausted.
If I build 2 lists as follows:
I am able to verify that they have been populated:
I expect to get '1' if I were to
lmpop
from these lists as follows:Instead I get the following error:
I am using:
Using rails 7.0.7.2
Using redis 5.0.8
Using redis-client 0.18.0
I was able to find this open issue: #1187
but it appears that the code for LMPOP and BLMPOP have both been merged and are in the version of the gem that I am using:
redis-rb/lib/redis/commands/lists.rb
Line 231 in 2b183ad
So it feels like these methods should be accessible and working, but maybe they are still in development and we would need to find a workaround until they are finished?
The text was updated successfully, but these errors were encountered: