Class: Rearview::MetricsValidatorService
- Inherits:
-
Object
- Object
- Rearview::MetricsValidatorService
show all
- Includes:
- Celluloid, Logger
- Defined in:
- lib/rearview/metrics_validator_service.rb
Defined Under Namespace
Classes: MetricsValidatorServiceError
Instance Method Summary
collapse
Methods included from Logger
#logger
Instance Method Details
#shutdown ⇒ Object
16
17
18
19
20
21
|
# File 'lib/rearview/metrics_validator_service.rb', line 16
def shutdown
logger.info "#{self} shutting down service..."
raise MetricsValidatorServiceError.new("service not started") unless started?
@task.actors.first.terminate
@started = false
end
|
#started? ⇒ Boolean
7
8
9
|
# File 'lib/rearview/metrics_validator_service.rb', line 7
def started?
@started
end
|
#startup ⇒ Object
10
11
12
13
14
15
|
# File 'lib/rearview/metrics_validator_service.rb', line 10
def startup
logger.info "#{self} starting up service..."
raise MetricsValidatorServiceError.new("service already started") if started?
@task = Rearview::MetricsValidatorTask.supervise(Rearview.config.metrics_validator_schedule)
@started = true
end
|