Class: Karafka::Web::Pro::Commanding::Commands::Stop

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/web/pro/commanding/commands/stop.rb

Overview

Note:

Does not work in an embedded mode because we do not own the Ruby process.

Sends a signal to stop the process

Instance Method Summary collapse

Instance Method Details

#callObject

Performs the command if not in embedded mode



24
25
26
27
28
# File 'lib/karafka/web/pro/commanding/commands/stop.rb', line 24

def call
  return unless standalone?

  ::Process.kill('QUIT', ::Process.pid)
end