lib/qsagi/queue.rb in qsagi-0.0.2 vs lib/qsagi/queue.rb in qsagi-0.0.3

- old
+ new

@@ -10,10 +10,10 @@ break if message[:payload] == :queue_empty end end def connect - @client = Bunny.new(:host => self.class.host, :port => self.class.port) + @client = Bunny.new(:host => self.class.host, :port => self.class.port, :heartbeat => self.class.heartbeat) @client.start @queue = @client.queue(self.class.queue_name, :durable => true, :arguments => {"x-ha-policy" => "all"}) @exchange = @client.exchange(self.class._exchange) @queue.bind(@exchange, :key => self.class.queue_name) unless self.class._exchange.empty? end