Skip to content

Commit

Permalink
Log an error message when a deserialization error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnaegle committed Mar 14, 2016
1 parent 7d688a8 commit f3ad5fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/delayed/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def run(job)
job_say job, format('COMPLETED after %.4f', runtime)
return true # did work
rescue DeserializationError => error
job_say job, "FAILED permanently with #{error.class.name}: #{error.message}", 'error'

job.last_error = "#{error.message}\n#{error.backtrace.join("\n")}"
failed(job)
rescue => error
Expand Down

0 comments on commit f3ad5fb

Please sign in to comment.