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



20
21
22
23
24
25
26
# File 'lib/karafka/web/pro/commanding/commands/consumers/quiet.rb', line 20

def call
  return unless standalone?

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

  result(status: 'applied')
end