Sha256: 14a00f04a54db3551fe157fece88247586aeb8c170ce00874effbc2dcf28defb

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 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 host_namespace:      self,
         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

3 entries across 3 versions & 1 rubygems

Version Path
rabbit-wq-2.2.0 lib/rabbit_wq.rb
rabbit-wq-2.1.0 lib/rabbit_wq.rb
rabbit-wq-2.0.0 lib/rabbit_wq.rb