Module: Archfiend::SharedLoop::Runnable
- Included in:
- Archfiend::SubprocessLoop, ThreadLoop
- Defined in:
- lib/archfiend/shared_loop/runnable.rb
Instance Method Summary collapse
Instance Method Details
#log_exception(exception) ⇒ Object
15 16 17 |
# File 'lib/archfiend/shared_loop/runnable.rb', line 15 def log_exception(exception) logger.error(message: exception.to_s, backtrace: exception.backtrace) end |
#run ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/archfiend/shared_loop/runnable.rb', line 4 def run loop do begin wrap_iterate rescue => e log_exception(e) sleep self.class.const_get('EXCEPTION_DELAY') end end end |