Sha256: 1478c5f60db7fa157bd268bdf188ff085fcbb4fc48e02a40cc4cde8b1f8150af

Contents?: true

Size: 268 Bytes

Versions: 2

Compression:

Stored size: 268 Bytes

Contents

module RabbitWQ
  module Queues

  protected

    def mq
      @mq ||= ::Bunny.new.tap do |bunny|
        bunny.start
      end
    end

    def channel
      @channel ||= mq.create_channel.tap do |c|
        c.prefetch( config.prefetch )
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rabbit-wq-2.3.0 lib/rabbit_wq/queues.rb
rabbit-wq-2.2.0 lib/rabbit_wq/queues.rb