Method: God::CLI::Command#log_command
- Defined in:
- lib/god/cli/command.rb
#log_command ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/god/cli/command.rb', line 110 def log_command begin Signal.trap('INT') { exit } name = @args[1] unless name puts "You must specify a Task or Group name" exit! end t = Time.at(0) loop do print @server.running_log(name, t) t = Time.now sleep 1 end rescue God::NoSuchWatchError puts "No such watch" rescue DRb::DRbConnError puts "The server went away" end end |