Sha256: 05c2421b49917dfe3bbb2099654e76e12a404fc212d41c7814e518d7f3dd7c50
Contents?: true
Size: 1.18 KB
Versions: 3
Compression:
Stored size: 1.18 KB
Contents
require 'bunny' require 'mono_logger' module Pwwka class ConfigurationError < StandardError; end class Configuration attr_accessor :rabbit_mq_host attr_accessor :topic_exchange_name attr_accessor :delayed_exchange_name attr_accessor :logger attr_accessor :options attr_accessor :send_message_resque_backoff_strategy attr_accessor :requeue_on_error def initialize @rabbit_mq_host = nil @topic_exchange_name = "pwwka.topics.#{Pwwka.environment}" @delayed_exchange_name = "pwwka.delayed.#{Pwwka.environment}" @logger = MonoLogger.new(STDOUT) @options = {} @send_message_resque_backoff_strategy = [5, #intermittent glitch? 60, # quick interruption 600, 600, 600] # longer-term outage? @requeue_on_error = false end def payload_logging @payload_logging || :info end def payload_logging=(new_payload_logging_level) @payload_logging = new_payload_logging_level end def allow_delayed? options[:allow_delayed] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pwwka-0.8.0 | lib/pwwka/configuration.rb |
pwwka-0.8.0.RC1 | lib/pwwka/configuration.rb |
pwwka-0.7.0.RC1 | lib/pwwka/configuration.rb |