lib/aerospike/client.rb in aerospike-0.1.5 vs lib/aerospike/client.rb in aerospike-0.1.6

- old
+ new

@@ -667,13 +667,10 @@ # If the policy is nil, a default policy will be generated. def query(statement, options={}) policy = opt_to_query_policy(options) new_policy = policy.clone - # Always set a taskId - statement.task_id = Time.now.to_i if statement.task_id == 0 - nodes = @cluster.nodes if nodes.length == 0 raise Aerospike::Exceptions::Aerospike.new(Aerospike::ResultCode::SERVER_NOT_AVAILABLE, "Scan failed because cluster is empty.") end @@ -724,11 +721,11 @@ options elsif options.is_a?(Hash) ClientPolicy.new( options[:timeout], options[:connection_queue_size], - options[:fail_if_not_connected], + options[:fail_if_not_connected] ) end end def opt_to_policy(options) @@ -740,10 +737,11 @@ Policy.new( options[:priority], options[:timeout], options[:max_retiries], options[:sleep_between_retries], + options[:consistency_level] ) end end def opt_to_write_policy(options) @@ -755,10 +753,11 @@ WritePolicy.new( options[:record_exists_action], options[:gen_policy], options[:generation], options[:expiration], - options[:send_key] + options[:send_key], + options[:commit_level] ) end end def opt_to_scan_policy(options)