Class: Toiler::CLI

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/toiler/cli.rb

Overview

Command line client interface

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#supervisorObject

Returns the value of attribute supervisor.



23
24
25
# File 'lib/toiler/cli.rb', line 23

def supervisor
  @supervisor
end

Instance Method Details

#run(args) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/toiler/cli.rb', line 25

def run(args)
  @self_read, @self_write = IO.pipe

  trap_signals
  options = Utils::ArgumentParser.parse(args)
  Utils::EnvironmentLoader.load(options)
  daemonize
  write_pid
  load_concurrent
  start_supervisor

  handle_stop
end