Module: SourceMonitor::Health
- Defined in:
- lib/source_monitor/health.rb,
lib/source_monitor/health/source_health_check.rb,
lib/source_monitor/health/source_health_reset.rb,
lib/source_monitor/health/source_health_monitor.rb,
lib/source_monitor/health/import_source_health_check.rb,
lib/source_monitor/health/source_health_check_orchestrator.rb
Defined Under Namespace
Classes: ImportSourceHealthCheck, SourceHealthCheck, SourceHealthCheckOrchestrator, SourceHealthMonitor, SourceHealthReset
Class Method Summary
collapse
Class Method Details
.fetch_callback ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/source_monitor/health.rb', line 17
def fetch_callback
@fetch_callback ||= lambda do |event|
source = event&.source
next unless source
SourceHealthMonitor.new(source: source).call
rescue StandardError => error
log_error(source, error)
end
end
|
.setup! ⇒ Object
13
14
15
|
# File 'lib/source_monitor/health.rb', line 13
def setup!
register_fetch_callback
end
|