Method: Flydata::Command::Sender#stop
- Defined in:
- lib/flydata/command/sender.rb
#stop(options = {}) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/flydata/command/sender.rb', line 52 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 'Something has gone wrong..' end |