Class: Karafka::Setup::Configurators::Celluloid

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/setup/configurators/celluloid.rb

Overview

Class responsible for setting up Celluloid settings

Constant Summary collapse

SHUTDOWN_TIME =

How many seconds should we wait for actors (listeners) before forcefully shutting them

30

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Karafka::Setup::Configurators::Base

Instance Method Details

#setupObject

Sets up a Karafka logger as celluloid logger



10
11
12
13
14
15
16
# File 'lib/karafka/setup/configurators/celluloid.rb', line 10

def setup
  ::Celluloid.logger = ::Karafka.logger
  # This is just a precaution - it should automatically close the current
  # connection and shutdown actor - but in case it didn't (hanged, etc)
  # we will kill it after waiting for some time
  ::Celluloid.shutdown_timeout = SHUTDOWN_TIME
end