lib/sneakers/publisher.rb in sneakers-1.0.3 vs lib/sneakers/publisher.rb in sneakers-1.0.4

- old
+ new

@@ -13,13 +13,13 @@ options[:routing_key] ||= to_queue Sneakers.logger.info {"publishing <#{msg}> to [#{options[:routing_key]}]"} @exchange.publish(msg, options) end - private attr_reader :exchange + private def ensure_connection! @bunny = Bunny.new(@opts[:amqp], heartbeat: @opts[:heartbeat], vhost: @opts[:vhost], :logger => Sneakers::logger) @bunny.start @channel = @bunny.create_channel @exchange = @channel.exchange(@opts[:exchange], type: @opts[:exchange_type], durable: @opts[:durable])