class Redis::Distributed
def ensure_same_node(command, *keys)
def ensure_same_node(command, *keys) tags = keys.map { |key| key_tag(key) } raise CannotDistribute, command if !tags.all? || tags.uniq.size != 1 yield(node_for(keys.first)) end
def ensure_same_node(command, *keys) tags = keys.map { |key| key_tag(key) } raise CannotDistribute, command if !tags.all? || tags.uniq.size != 1 yield(node_for(keys.first)) end