Class: Karafka::Web::Pro::Commanding::Commands::Consumers::Quiet

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

Overview

Note:

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

Sends a signal to quiet the consumer

Instance Attribute Summary

Attributes inherited from Base

#command

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Karafka::Web::Pro::Commanding::Commands::Base

Instance Method Details

#callObject

Performs the command if not in embedded mode



45
46
47
48
49
50
51
# File 'lib/karafka/web/pro/commanding/commands/consumers/quiet.rb', line 45

def call
  return unless standalone?

  ::Process.kill("TSTP", ::Process.pid)

  result(status: "applied")
end