lib/redis_cluster/pool.rb in redis_cluster-0.2.3 vs lib/redis_cluster/pool.rb in redis_cluster-0.2.4

- old
+ new

@@ -21,18 +21,18 @@ end # other_options: # asking # random_node - def execute(method, args, other_options) - return keys(args.first) if Configuration::SUPPORT_MULTI_NODE_METHODS.include?(method.to_s) + def execute(method, args, other_options, &block) + return send(method, args.first) if Configuration::SUPPORT_MULTI_NODE_METHODS.include?(method.to_s) key = key_by_command(method, args) raise NotSupportError if key.nil? node = other_options[:random_node] ? random_node : node_by(key) node.asking if other_options[:asking] - node.execute(method, args) + node.execute(method, args, &block) end def keys(glob = "*") on_each_node(:keys, glob).flatten end