module Unrestful::Utils
Public Instance Methods
safe_thread(name, &block)
click to toggle source
# File lib/unrestful/utils.rb, line 11 def safe_thread(name, &block) Thread.new do Thread.current['unrestful_name'.freeze] = name watchdog(name, &block) end end
watchdog(last_words) { || ... }
click to toggle source
# File lib/unrestful/utils.rb, line 4 def watchdog(last_words) yield rescue Exception => exc Rails.logger.debug "#{last_words}: #{exc}" #raise exc end