Permalink
Browse files

Job worker thread logs failed jobs too

  • Loading branch information...
1 parent 411378e commit 26f52b2ac1f8d6208bd017e6c0241e33147f5284 @jeremy jeremy committed Oct 26, 2012
@@ -96,7 +96,7 @@ def run(job)
end
def handle_exception(job, exception)
- @logger.error "Job Error: #{exception.message}\n#{exception.backtrace.join("\n")}"
+ @logger.error "Job Error: #{job.inspect}\n#{exception.message}\n#{exception.backtrace.join("\n")}"
end
end
end
@@ -68,7 +68,7 @@ def teardown
@queue.drain
assert_equal 1, @logger.logged(:error).size
- assert_match 'Job Error: RuntimeError: Error!', @logger.logged(:error).last
+ assert_match "Job Error: #{job.inspect}\nRuntimeError: Error!", @logger.logged(:error).last
end
test "logger defaults to stderr" do

0 comments on commit 26f52b2

Please sign in to comment.