Class: HostStatus::DlmlockStatus
- Inherits:
-
Status
- Object
- Status
- HostStatus::DlmlockStatus
- Defined in:
- app/models/host_status/dlmlock_status.rb
Constant Summary collapse
- OK =
0
- STALE =
1
Class Method Summary collapse
Instance Method Summary collapse
- #relevant?(_options = {}) ⇒ Boolean
- #to_global(_options = {}) ⇒ Object
- #to_label(_options = {}) ⇒ Object
- #to_status(_options = {}) ⇒ Object
Class Method Details
.status_name ⇒ Object
8 9 10 |
# File 'app/models/host_status/dlmlock_status.rb', line 8 def self.status_name N_('Distributed Lock') end |
Instance Method Details
#relevant?(_options = {}) ⇒ Boolean
36 37 38 |
# File 'app/models/host_status/dlmlock_status.rb', line 36 def relevant?( = {}) host.dlmlocks.any? end |
#to_global(_options = {}) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'app/models/host_status/dlmlock_status.rb', line 23 def to_global( = {}) case to_status when OK HostStatus::Global::OK else HostStatus::Global::ERROR end end |