Sha256: b26b639657f530ff869ba518506c7f5c935831444551dd48f4204c64a90e19c7
Contents?: true
Size: 495 Bytes
Versions: 1
Compression:
Stored size: 495 Bytes
Contents
module RailsAutoscaleAgent class Request attr_reader :id, :entered_queue_at, :path def initialize(env, config) @id = env['HTTP_X_REQUEST_ID'] @path = env['PATH_INFO'] @entered_queue_at = if unix_millis = env['HTTP_X_REQUEST_START'] Time.at(unix_millis.to_f / 1000) elsif config.fake_mode? Time.now - rand(1000) / 1000.0 # 0-1000 ms ago end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_autoscale_agent-0.2.0 | lib/rails_autoscale_agent/request.rb |