Class: FrenzyBunnies::Web

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/frenzy_bunnies/web.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run_with(jobs, opts = {}) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/frenzy_bunnies/web.rb', line 41

def self.run_with(jobs, opts={})
  set :jobs, (jobs || [])
  set :health_collector, FrenzyBunnies::Health::Collector.new({:jvm => {:threadfilter => opts[:threadfilter]}})
  @logger = opts[:logger]
  @logger.info "* running web dashboard bound to #{opts[:host]} on port #{opts[:port]}."
  Rack::Handler::WEBrick.run self, :Host => opts[:host], :Port => opts[:port],  :Logger => WEBrick::Log.new("/dev/null"), :AccessLog => [nil, nil]
end

Instance Method Details

#jobsObject



48
49
50
# File 'lib/frenzy_bunnies/web.rb', line 48

def jobs
  settings.jobs
end