Permalink
Browse files

modify multi( why not use this?)

  • Loading branch information...
1 parent 4bd50b3 commit 3389cd2ee7800c2f773ec54d6f567fe47e3c3876 @yuc-zhu committed Mar 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/redis/distributed.rb
@@ -566,7 +566,7 @@ def sort(key, options = {})
# Mark the start of a transaction block.
def multi
- raise CannotDistribute, :multi
+ nodes.each(&:multi)
end
# Watch the given keys to determine execution of the MULTI/EXEC block.
@@ -581,7 +581,7 @@ def unwatch
# Execute all commands issued after MULTI.
def exec
- raise CannotDistribute, :exec
+ nodes.each(&:exec)
end
# Discard all commands issued after MULTI.

0 comments on commit 3389cd2

Please sign in to comment.