My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
RpoplpushCommand  
Updated Dec 21, 2010 by anti...@gmail.com

We moved to Redis.io!

Redis home moved to http://redis.io, please visit our new home.

Comment by JanLehna...@gmail.com, Nov 28, 2009

RPOPLPUSH is a bulk command:

RPOPLPUSH src 5 target

Comment by pcdinh, Dec 27, 2009

RPOPLPUSH returns a bulk reply that indicates the affected element in the source list

LPUSH k1 1 k +OK RPOPLPUSH k1 2 k2 $1 k

Comment by project member anti...@gmail.com, Jan 22, 2010

sorry there is a bug in this command, Redis is expecting a bulk last argument while it's totally not needed. I'll fix this in Redis 1.2.1 synching with client libs authors.

Comment by jooo...@gmail.com, Feb 23, 2010

great idea, but I think it's the wrong direction for queues. Queues are FiFo? (first in, first out). We fill the queue with RPUSH(key,value) Docs: "Append an element to the tail of the List value at key" So we need LPOP to get the oldest message. Please give us LPOPRPUSH or everybody has to implement the queues in revers logic! Or am I totally wrong?

Comment by aaron.gi...@gmail.com, Jun 22, 2010

Can anyone give an example of using RPOPLPUSH to traverse a list?

I was thinking that I could refactor this method: http://github.com/defunkt/resque/blob/master/lib/resque/job.rb#L78 to use RPOPLPUSH instead of LRANGE and LREM.

Comment by fer...@gmail.com, Aug 23, 2010

RPOPLPUSH can be used to traverse a list by making srckey and destkey the same. This just rotates the list, except in redis-1.2.6 it just pops elements and empties the list for some reason, works perfectly fine in 2.0.0 however.


Sign in to add a comment
Powered by Google Project Hosting