Method: Flydata::Command::Sender#stop
- Defined in:
- lib/flydata/command/sender.rb
#stop(options = {}) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/flydata/command/sender.rb', line 85 def stop( = {}) unless process_exist? log_info_stdout("Process doesn't exist.") unless [:quiet] return true end log_info_stdout('Stopping sender process.') unless [:quiet] if Kernel.system("kill `cat #{pid_file}`") and wait_until_client_stop() log_info_stdout('Done.') unless [:quiet] return true end raise 'Failed to stop sender process.' end |