Class: LogrageWaittime::RequestStartedMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/lograge_waittime/request_started_middleware.rb

Overview

Track at what time the request handling starts

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RequestStartedMiddleware

Returns a new instance of RequestStartedMiddleware.



4
5
6
# File 'lib/lograge_waittime/request_started_middleware.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
# File 'lib/lograge_waittime/request_started_middleware.rb', line 8

def call(env)
  ::RequestStore[:lograge_waittime] = ::LogrageWaittime::RequestQueuing.new(env)
  @app.call env
end