resque errors caused by Marshal dump failures and wrap exceptions in marshallable DRbRemoteError

This commit is contained in:
Lachlan Sylvester 2018-10-09 18:13:12 +11:00
parent a1ee4a9ff9
commit bb03948945
1 changed files with 8 additions and 1 deletions

View File

@ -78,7 +78,14 @@ module ActiveSupport
reporter = job[2]
result = Minitest.run_one_method(klass, method)
queue.record(reporter, result)
begin
queue.record(reporter, result)
rescue DRb::DRbConnError
result.failures.each do |failure|
failure.exception = DRb::DRbRemoteError.new(failure.exception)
end
queue.record(reporter, result)
end
end
ensure
run_cleanup(worker)