Method: Redis::Distributed#watch
- Defined in:
- lib/redis/distributed.rb
#watch(*keys, &block) ⇒ Object
Watch the given keys to determine execution of the MULTI/EXEC block.
966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/redis/distributed.rb', line 966 def watch(*keys, &block) ensure_same_node(:watch, keys) do |node| @watch_key = key_tag(keys.first) || keys.first.to_s begin node.watch(*keys, &block) rescue StandardError @watch_key = nil raise end end end |