module Blue::Resque

Constants

VERSION

Public Class Methods

configure() click to toggle source
# File lib/blue/resque.rb, line 9
def self.configure
  Blue.configure({
    :resque => {
      :queues => {}
    }
  })
end
included(klass) click to toggle source
# File lib/blue/resque.rb, line 35
def self.included(klass)
  klass.add_role(:resque)
  klass.class_eval do
    recipe :resque_monitoring
  end
end
worker_pid_path(worker_id) click to toggle source
# File lib/blue/resque.rb, line 17
def self.worker_pid_path(worker_id)
  File.join(Blue.shared_path, 'pids', "/resque_worker_#{worker_id}.pid")
end

Public Instance Methods

resque_monitoring() click to toggle source
# File lib/blue/resque.rb, line 21
def resque_monitoring
  if Blue.const_defined?(:Monit)
    file "/etc/monit/conf.d/resque.conf",
      :ensure  => :present,
      :mode    => '700',
      :backup  => false,
      :content => template(File.join(File.dirname(__FILE__), '..', '..', 'templates', 'monit.conf.erb'), binding),
      :notify  => service('monit')

  elsif Blue.const_defined?(:God)
    # Define this yo'self homie.
  end
end