Sha256: fab6ffe895ea900156ef3f03500f4ec34d59da5e15051282e0db3c36cbd4164b

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

require 'servitude'

module RabbitWQ
  class Configuration < Servitude::Configuration

    def self.defaults
      {
        delayed_exchange_prefix: 'work-delay',
        delayed_queue_prefix: 'work-delay',
        env: 'production',
        error_queue: 'work-error',
        log: "/var/log/rabbit-wq/#{RabbitWQ.process_name}.log",
        log_level: 'info',
        pid: "/var/run/rabbit-wq/#{RabbitWQ.process_name}.pid",
        prefetch: 50,
        supervision_retry_timeout_in_seconds: 1,
        threads: 1,
        time_zone: 'UTC',
        work_exchange: 'work',
        work_exchange_type: 'fanout',
        work_log_level: 'info',
        work_log_path: '/var/log/rabbit-wq/rabbit-wq-work.log',
        work_publish_queue: 'work',
        work_subscribe_queue: 'work'
      }
    end

    def ignored_workers_to_error_queue
      return [] unless ignored_workers
      Array( ignored_workers.to_error_queue )
    end

    def ignored_workers_trash
      return [] unless ignored_workers
      Array( ignored_workers.trash )
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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