Sha256: 9b99db493f4dcc18eeb12f5f35e3d9ab9eec95c202170205b912331549b00368

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

require 'rainbow'
require 'servitude'
require 'rabbit_wq/version'

module RabbitWQ

  include Servitude::Base

  autoload :Command,          'rabbit_wq/command'
  autoload :Cli,              'rabbit_wq/cli'
  autoload :Configuration,    'rabbit_wq/configuration'
  autoload :FinalError,       'rabbit_wq/final_error'
  autoload :InvalidWorkError, 'rabbit_wq/invalid_work_error'
  autoload :Queues,           'rabbit_wq/queues'
  autoload :MessageHandler,   'rabbit_wq/message_handler'
  autoload :Server,           'rabbit_wq/server'
  autoload :Work,             'rabbit_wq/work'
  autoload :Worker,           'rabbit_wq/worker'
  autoload :WorkLogger,       'rabbit_wq/work_logger'
  autoload :WorkLogging,      'rabbit_wq/work_logging'

  def self.perform_boot
    author = 'C. Jason Harrelson'

    years = 2013
    years = "#{years}–#{::Time.now.year}" if years < ::Time.now.year

    boot app_name:            'Rabbit WQ',
         author:              author,
         attribution:         "v#{VERSION} Copyright © #{years} #{author}",
         default_config_path: "/etc/rabbit-wq/#{process_name}.conf",
         use_config:          true
  end

  def self.process_name
    'rabbit-wq'
  end

  class << self
    attr_accessor :work_logger
  end

  perform_boot

end

Version data entries

1 entries across 1 versions & 1 rubygems

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