Class: Autoscaler::IgnoreScheduledAndRetrying

Inherits:
Object
  • Object
show all
Defined in:
lib/autoscaler/ignore_scheduled_and_retrying.rb

Instance Method Summary collapse

Constructor Details

#initialize(strategy) ⇒ IgnoreScheduledAndRetrying

Returns a new instance of IgnoreScheduledAndRetrying.



3
4
5
# File 'lib/autoscaler/ignore_scheduled_and_retrying.rb', line 3

def initialize(strategy)
  @strategy = strategy
end

Instance Method Details

#call(system, event_idle_time) ⇒ Object



7
8
9
10
11
# File 'lib/autoscaler/ignore_scheduled_and_retrying.rb', line 7

def call(system, event_idle_time)
  system.define_singleton_method(:scheduled) { 0 }
  system.define_singleton_method(:retrying)  { 0 }
  @strategy.call(system, event_idle_time)
end