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.



26
27
28
# File 'lib/toiler/cli.rb', line 26

def supervisor
  @supervisor
end

Instance Method Details

#run(args) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/toiler/cli.rb', line 28

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