Class: Necropsy::Analyzers::Dynamic::RedisDeadline
- Inherits:
-
Object
- Object
- Necropsy::Analyzers::Dynamic::RedisDeadline
- Defined in:
- lib/necropsy/analyzers/dynamic/redis_input_limits.rb
Instance Method Summary collapse
- #check! ⇒ Object
-
#initialize(seconds) ⇒ RedisDeadline
constructor
A new instance of RedisDeadline.
- #remaining ⇒ Object
Constructor Details
#initialize(seconds) ⇒ RedisDeadline
Returns a new instance of RedisDeadline.
71 72 73 |
# File 'lib/necropsy/analyzers/dynamic/redis_input_limits.rb', line 71 def initialize(seconds) @expires_at = monotonic_time + seconds end |
Instance Method Details
#check! ⇒ Object
82 83 84 85 |
# File 'lib/necropsy/analyzers/dynamic/redis_input_limits.rb', line 82 def check! remaining nil end |
#remaining ⇒ Object
75 76 77 78 79 80 |
# File 'lib/necropsy/analyzers/dynamic/redis_input_limits.rb', line 75 def remaining seconds = @expires_at - monotonic_time raise Error, 'Redis total timeout exceeded' unless seconds.positive? seconds end |