Sha256: f68cf7c0b5cf71b436565873a2ed97bea4a680db7689a45b88d2df9adc312ff3

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Setup
    class Configurators
      # Class responsible for setting up Celluloid settings
      class Celluloid < Base
        # Sets up a Karafka logger as celluloid logger
        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 = config.celluloid.shutdown_timeout
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
karafka-1.0.1 lib/karafka/setup/configurators/celluloid.rb