lib/legion/transport/queue.rb in legion-transport-1.1.6 vs lib/legion/transport/queue.rb in legion-transport-1.1.8
- old
+ new
@@ -7,16 +7,16 @@
retries ||= 0
@options = options
super(channel, queue, options_builder(default_options, queue_options, options))
rescue Legion::Transport::CONNECTOR::PreconditionFailed
retries.zero? ? retries = 1 : raise
- recreate_queue(channel, queue)
+ recreate_queue(queue)
retry
end
- def recreate_queue(channel, queue)
+ def recreate_queue(queue)
Legion::Logging.warn "Queue:#{queue} exists with wrong parameters, deleting and creating"
- queue = ::Bunny::Queue.new(channel, queue, no_declare: true, passive: true)
+ queue = ::Bunny::Queue.new(Legion::Transport::Connection.channel, queue, no_declare: true, passive: true)
queue.delete(if_empty: true)
end
def default_options
hash = Concurrent::Hash.new