small medium large xlarge

01 Aug 2012, 18:04
Felix Gessert (1 post)


cool book. Stumbled upon a mistake in the Redis Chapter:

redis.multi do
   site = redis.rpop('eric:wishlist')
   redis.lpush('eric:visited', site)

won’t work. Since operations in a multi block are queued/batched, redis.rpop will only return a Future, which can’t be pushed into a list. Thus, both operations can’t be combined in single Redis transaction without RPOPLPUSH.

Write “Seven More Databases in Seven Weeks”, soon ;-) Bye, Felix

02 Aug 2012, 03:31
Jim R. Wilson (84 posts)

Hi Felix,

Good point! We’ll make it more clear that our code example would fail for the reason you specified. Thanks,

– Jim R. Wilson

You must be logged in to comment