Module: RunnerHelper
- Defined in:
- lib/runner_helper.rb,
lib/runner_helper/version.rb
Overview
Periodically run in infinite loop
Constant Summary collapse
- TIMEOUT =
5
- VERSION =
'0.0.6'.freeze
Instance Method Summary collapse
Instance Method Details
#run_once ⇒ Object
17 18 19 |
# File 'lib/runner_helper.rb', line 17 def run_once raise NotImplementedError.new, 'implement `run_once` method first' end |
#service ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/runner_helper.rb', line 8 def service loop do run_once sleep self.class::TIMEOUT end rescue => ex ExceptionNotifier.notify_exception(ex) end |