lib/rabbit_carrots/connection.rb in rabbit_carrots-0.1.20 vs lib/rabbit_carrots/connection.rb in rabbit_carrots-1.0.0

- old
+ new

@@ -9,10 +9,14 @@ @connection = Bunny.new( host: RabbitCarrots.configuration.rabbitmq_host, port: RabbitCarrots.configuration.rabbitmq_port, user: RabbitCarrots.configuration.rabbitmq_user, password: RabbitCarrots.configuration.rabbitmq_password, - vhost: RabbitCarrots.configuration.rabbitmq_vhost + vhost: RabbitCarrots.configuration.rabbitmq_vhost, + automatically_recover: RabbitCarrots.configuration.automatically_recover || true, + network_recovery_interval: RabbitCarrots.configuration.network_recovery_interval || 5, + recovery_attempts: RabbitCarrots.configuration.recovery_attempts || 5, + recovery_attempts_exhausted: -> { Process.kill('TERM', Process.pid) } ) @connection.start end