Class: Flapjack::Filters::UnscheduledMaintenance
- Inherits:
-
Object
- Object
- Flapjack::Filters::UnscheduledMaintenance
- Includes:
- Base
- Defined in:
- lib/flapjack/filters/unscheduled_maintenance.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#block?(check, opts = {}) ⇒ Boolean
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/flapjack/filters/unscheduled_maintenance.rb', line 10 def block?(check, opts = {}) new_state = opts[:new_state] result = check.in_unscheduled_maintenance? && !('acknowledgement'.eql?(new_state.action) || Flapjack::Data::Condition.healthy?(new_state.condition)) Flapjack.logger.debug { "Filter: Unscheduled Maintenance: #{result ? "block" : "pass"}" } result end |