Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/delayed/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def self.work_off(num = 100)

# Moved into its own method so that new_relic can trace it.
def invoke_job
payload_object.perform
payload_object.perform if payload_object
end

private
Expand All @@ -227,13 +227,13 @@ def deserialize(source)
handler_class = $1
end
attempt_to_load(handler_class || handler.class)
handler = YAML.load(source)
handler = YAML.load(source) rescue nil
end

return handler if handler.respond_to?(:perform)

raise DeserializationError,
'Job failed to load: Unknown handler. Try to manually require the appropiate file.'
'Job failed to load: Unknown handler. Try to manually require the appropiate file.' if handler
rescue TypeError, LoadError, NameError => e
raise DeserializationError,
"Job failed to load: #{e.message}. Try to manually require the required file."
Expand Down