Method: Flamingo::Daemon::WaderProcess#run

Defined in:
lib/flamingo/daemon/wader_process.rb

#runObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/flamingo/daemon/wader_process.rb', line 31

def run
  register_signal_handlers
  $0 = 'flamingod-wader'
  config = Flamingo.config
  
  screen_name = config.username
  password    = config.password
  stream      = Stream.get(config.stream)

  @wader = Flamingo::Wader.new(screen_name,password,stream)
  Flamingo.logger.info "Starting wader on pid=#{Process.pid} under pid=#{Process.ppid}"
  
  exit_code = EXIT_CLEAN
  begin
    @wader.run
  rescue => e
    exit_code = error_exit_code(e)
  end
  
  Flamingo.logger.info "Wader pid=#{Process.pid} exited with code #{exit_code}"
  exit(exit_code)
end