Method: CentralMail::Service.current_breaker_outage?

Defined in:
lib/central_mail/service.rb

.current_breaker_outage?Boolean

Returns:

  • (Boolean)


73
74
75
76
77
78
79
80
# File 'lib/central_mail/service.rb', line 73

def self.current_breaker_outage?
  last_cm_outage = Breakers::Outage.find_latest(service: CentralMail::Configuration.instance.breakers_service)
  if last_cm_outage.present? && last_cm_outage.end_time.blank?
    return CentralMail::Service.new.status('').try(:status) != 200
  end

  false
end