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

✨ Add BLMPOP #1199

Merged
merged 2 commits into from
Jun 12, 2023
Merged

✨ Add BLMPOP #1199

merged 2 commits into from
Jun 12, 2023

Conversation

JerrodCarpenter
Copy link
Contributor

  redis-rb git:(BLMPOP) ./bin/console 
irb(main):001:0> redis = Redis.new(url: "redis://localhost:6379/2")
=> #<Redis client v5.0.6 for redis://localhost:6379/2>
irb(main):002:0> redis.rpush("list", [6, 1, 2, 3, 4, 5, 6])
=> 9
irb(main):003:0> redis.lmpop(1, "list")
=> ["list", ["4"]]
irb(main):004:0> redis.blmpop(1, "list")
=> ["list", ["3"]]
irb(main):005:0> redis.blmpop(1, "list", modifier: "RIGHT")
=> ["list", ["6"]]
irb(main):006:0> redis.lmpop(1, "list1", "list", modifier: "RIGHT", count: 2)
=> ["list", ["5", "4"]]
irb(main):007:0> redis.blmpop(1, "list1", "list", modifier: "RIGHT", count: 2)
=> ["list", ["3", "2"]]

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

Successfully merging this pull request may close these issues.

2 participants