module AsyncJob
Public Instance Methods
Source
# File lib/async_job.rb, line 6 def run(label: "async", &block) Thread.new do block.call rescue StandardError => e warn "[rabbot] #{label} failed: #{e.class}: #{e.message}" warn e.backtrace.join("\n") if ENV["RABBOT_DEBUG"] == "1" raise if ENV["RABBOT_RAISE_ASYNC_ERRORS"] == "1" end end