lib/bunny/channel.rb in bunny-1.0.0.pre4 vs lib/bunny/channel.rb in bunny-1.0.0.pre5

- old
+ new

@@ -600,11 +600,11 @@ raise ArgumentError.new("prefetch count must be a positive integer, given: #{prefetch_count}") if prefetch_count < 0 raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Basic::Qos.encode(@id, 0, prefetch_count, global)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_basic_qos_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @prefetch_count = prefetch_count @@ -619,11 +619,11 @@ # @api public def basic_recover(requeue) raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Basic::Recover.encode(@id, requeue)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_basic_recover_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_basic_recover_ok @@ -821,11 +821,11 @@ exclusive, false, arguments)) begin - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_basic_consume_ok = wait_on_continuations end rescue Exception => e # if basic.consume-ok never arrives, unregister the proactively # registered consumer. MK. @@ -871,11 +871,11 @@ consumer.exclusive, false, consumer.arguments)) begin - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_basic_consume_ok = wait_on_continuations end rescue Exception => e # if basic.consume-ok never arrives, unregister the proactively # registered consumer. MK. @@ -906,11 +906,11 @@ # @see http://rubybunny.info/articles/queues.html Queues and Consumers guide # @api public def basic_cancel(consumer_tag) @connection.send_frame(AMQ::Protocol::Basic::Cancel.encode(@id, consumer_tag, false)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_basic_cancel_ok = wait_on_continuations end maybe_kill_consumer_work_pool! unless any_consumers? @@ -980,11 +980,11 @@ @connection.send_frame(AMQ::Protocol::Queue::Delete.encode(@id, name, opts[:if_unused], opts[:if_empty], false)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_queue_delete_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_queue_delete_ok @@ -1000,11 +1000,11 @@ def queue_purge(name, opts = {}) raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Queue::Purge.encode(@id, name, false)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_queue_purge_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_queue_purge_ok @@ -1036,11 +1036,11 @@ name, exchange_name, opts[:routing_key], false, opts[:arguments])) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_queue_bind_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_queue_bind_ok @@ -1071,11 +1071,11 @@ @connection.send_frame(AMQ::Protocol::Queue::Unbind.encode(@id, name, exchange_name, opts[:routing_key], opts[:arguments])) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_queue_unbind_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_queue_unbind_ok @@ -1110,11 +1110,11 @@ opts.fetch(:durable, false), opts.fetch(:auto_delete, false), false, false, opts[:arguments])) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_exchange_declare_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_exchange_declare_ok @@ -1135,11 +1135,11 @@ @connection.send_frame(AMQ::Protocol::Exchange::Delete.encode(@id, name, opts[:if_unused], false)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_exchange_delete_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_exchange_delete_ok @@ -1179,11 +1179,11 @@ destination_name, source_name, opts[:routing_key], false, opts[:arguments])) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_exchange_bind_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_exchange_bind_ok @@ -1223,11 +1223,11 @@ destination_name, source_name, opts[:routing_key], false, opts[:arguments])) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_exchange_unbind_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_exchange_unbind_ok @@ -1251,11 +1251,11 @@ # @api public def channel_flow(active) raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Channel::Flow.encode(@id, active)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_channel_flow_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_channel_flow_ok @@ -1272,11 +1272,11 @@ # @api public def tx_select raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Tx::Select.encode(@id)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_tx_select_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_tx_select_ok @@ -1287,11 +1287,11 @@ # @api public def tx_commit raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Tx::Commit.encode(@id)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_tx_commit_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_tx_commit_ok @@ -1302,11 +1302,11 @@ # @api public def tx_rollback raise_if_no_longer_open! @connection.send_frame(AMQ::Protocol::Tx::Rollback.encode(@id)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_tx_rollback_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_tx_rollback_ok @@ -1342,10 +1342,10 @@ end @confirms_callback = callback @connection.send_frame(AMQ::Protocol::Confirm::Select.encode(@id, false)) - Bunny::Timer.timeout(read_write_timeout, ClientTimeout) do + Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do @last_confirm_select_ok = wait_on_continuations end raise_if_continuation_resulted_in_a_channel_error! @last_confirm_select_ok end