Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Catch everything thrown for on_failure hooks #25

Merged
merged 1 commit into from

2 participants

@yaauie

Catch all objects thrown like Resque does in lib/resque/job.rb:155

@justinweiss
Owner

This is so weird. wtf would Resque trap every object?

@yaauie
@justinweiss justinweiss merged commit fb12a1a into justinweiss:master
@justinweiss
Owner

I'll merge it because it's what resque does, but treating any thrown object as a failure seems really wrong to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/resque_unit/resque.rb
View
2  lib/resque_unit/resque.rb
@@ -208,7 +208,7 @@ def perform_with_hooks(job_payload)
# If an exception occurs during the job execution, look for an
# on_failure hook then re-raise.
- rescue => e
+ rescue Object => e
failure_hooks.each { |hook| job_class.send(hook, e, *job_payload["args"]) }
raise e
end
Something went wrong with that request. Please try again.