Class: LS4::TimeCheckService
Constant Summary
collapse
- THRESHOLD =
3
- INTERVAL =
60*10
Instance Method Summary
collapse
Methods inherited from Service
init
#ebus_bind!, #ebus_connect, extended
#ebus_all_slots, #ebus_disconnect!
#connect, #ebus_all_slots, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots
#call_slot, #signal_slot
Instance Method Details
#check_blocking! ⇒ Object
25
26
27
28
|
# File 'lib/ls4/service/time_check.rb', line 25
def check_blocking!
do_check.join
nil
end
|
#on_timer ⇒ Object
41
42
43
|
# File 'lib/ls4/service/time_check.rb', line 41
def on_timer
do_check if @timer
end
|
#run ⇒ Object
30
31
32
33
34
|
# File 'lib/ls4/service/time_check.rb', line 30
def run
@timer = ProcessBus.start_timer(INTERVAL, true) do
on_timer
end
end
|
#shutdown ⇒ Object
36
37
38
39
|
# File 'lib/ls4/service/time_check.rb', line 36
def shutdown
@timer = nil
end
|