I am using redis gem with Ruby 1.9
Is it is possible to catch Redis exceptions inside Redis.pipelined to make sure the rest of the batch gets executed too?
I tried
redis.pipelined do
begin
redis.hGet …
rescue Redis::ComandError
…
end
end
but the rescue code never gets executed.
Multi seems to work similarly to pipelined except each operation is atomic. My “aaa” key was set even tho the smembers caused an exception to be thrown. I know this isn’t exactly what you were looking for since u can’t handle the exception inside the block.