Module: BigWig

Defined in:
lib/bigwig.rb,
lib/bigwig/job.rb,
lib/bigwig/push.rb,
lib/bigwig/pinger.rb,
lib/bigwig/plugin.rb,
lib/bigwig/runner.rb,
lib/bigwig/plugins.rb,
lib/bigwig/init_scripts.rb

Defined Under Namespace

Classes: InitScripts, Job, Pinger, Plugin, Plugins, Push, Runner

Class Method Summary collapse

Class Method Details

.connect_using(config) ⇒ Object



20
21
22
23
24
25
26
27
28
29
# File 'lib/bigwig.rb', line 20

def self.connect_using config
  env = ENV['WARREN_ENV'] || 'development'
  
  h = {:user => config["user"], :pass => config["password"], :vhost => config["vhost"], :default_queue => config["queue"], :host => config["server"], :logging => config["warren_logging"]}

  params = { env => h }
  
  Warren::Queue.logger = BigWig::logger
  Warren::Queue.connection = params
end

.loggerObject



8
9
10
11
12
13
14
# File 'lib/bigwig.rb', line 8

def self.logger
  @logger ||= begin
    l = Logger.new(STDERR)
    l.level = Logger::DEBUG
    l
  end
end

.logger=(l) ⇒ Object



16
17
18
# File 'lib/bigwig.rb', line 16

def self.logger=(l)
  @logger = l
end