Module: Upfluence::Utils::Thrift::Middleware

Defined in:
lib/upfluence/utils/thrift/middleware.rb,
lib/upfluence/utils/thrift/middleware/timeout.rb,
lib/upfluence/utils/thrift/middleware/active_record.rb,
lib/upfluence/utils/thrift/middleware/error_catcher.rb,
lib/upfluence/utils/thrift/middleware/request_logger.rb,
lib/upfluence/utils/thrift/middleware/connection_pooler.rb

Defined Under Namespace

Classes: ActiveRecord, ConnectionPooler, ErrorCatcher, RequestLogger, Timeout

Class Method Summary collapse

Class Method Details

.setup(handler, timeout = 30) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/upfluence/utils/thrift/middleware.rb', line 10

def setup(handler, timeout = 30)
  ErrorCatcher.new(
    Timeout.new(
      RequestLogger.new(handler, Upfluence.logger), timeout
    ),
    Upfluence.error_logger
  )
end