nateware / redis-objects

Map Redis types directly to Ruby objects
Artistic License 2.0
2.09k stars 229 forks source link

Queue type #229

Closed KevinColemanInc closed 4 years ago

KevinColemanInc commented 6 years ago

I used redis-objects to define a queue attribute on a rails model. Would you be interesting in adding this to the gem?

The current API looks like this:

class User
  queue :give_review_queue
end

which adds these methods:

user.rpoplpush_give_review_queue
user.give_review_queue=(value)
user.requeue_give_review_queue(target)     # moves target value to the back of the queue
user.rotate_give_review_queue_until_match # rotates queue until a match is found.
nateware commented 6 years ago

Sounds cool - can you send me a pull request with tests? Sorry for my delay.

artinboghosian commented 6 years ago

What's the difference between this and a list? Are you just wrapping a list with extra methods?

nateware commented 4 years ago

Closed due to lack of interest by the community in providing a patch.