lib/pika_que/connection.rb in pika_que-0.1.3 vs lib/pika_que/connection.rb in pika_que-0.1.4
- old
+ new
@@ -8,11 +8,9 @@
attr_reader :connection
def initialize(opts = {})
@opts = PikaQue.config.merge(opts)
- @opts[:amqp] = ENV.fetch('RABBITMQ_URL', 'amqp://guest:guest@localhost:5672')
- @opts[:vhost] = AMQ::Settings.parse_amqp_url(@opts[:amqp]).fetch(:vhost, '/')
end
def self.create(opts = {})
new(opts).tap{ |conn| conn.connect! }
end