module LoopHard::TimeoutTrap
Public Class Methods
continue?(options)
click to toggle source
Returns false if the timeout has expired. True otherwise. Expects an options has with a `maximum_end_time` key.
# File lib/loop_hard/timeout_trap.rb, line 7 def continue?(options) if options[:maximum_end_time] && Time.now > options[:maximum_end_time] LoopHard.logger.info "Ending loop due to timeout" return false end return true end