Skip to content

Delayed job for psych #630

Closed
wants to merge 3 commits into from

3 participants

@APShirley

No description provided.

@albus522 albus522 commented on the diff Sep 19, 2014
lib/delayed/backend/base.rb
@@ -93,9 +93,9 @@ def payload_object
else
@payload_object ||= YAML.load(self.handler)
end
- rescue TypeError, LoadError, NameError, ArgumentError => e
+ rescue Exception => e
@albus522
Collective Idea member
albus522 added a note Sep 19, 2014

If you are seeing a new error, catch that. Catching Exception is always a bad idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@albus522 albus522 commented on the diff Sep 19, 2014
lib/delayed/worker.rb
@@ -209,7 +209,11 @@ def run(job)
job_say job, 'COMPLETED after %.4f' % runtime
return true # did work
rescue DeserializationError => error
- job.last_error = "#{error.message}\n#{error.backtrace.join("\n")}"
+ if "#{error.message}\n#{error.backtrace.join("\n")}".length > 255
@albus522
Collective Idea member
albus522 added a note Sep 19, 2014

last_error is a text field. It can handle a lot more than 255. If there is a limit it is usually around 65k characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@albus522 albus522 closed this Sep 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.