Skip to content

Commit fd03267

Browse files
lazyatomdefunkt
authored andcommitted
Log any catastrophic issues when reserving, but still raise the error so that resque dies.
1 parent 6a3a283 commit fd03267

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/resque/worker.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ def reserve
178178
end
179179

180180
nil
181+
rescue Exception => e
182+
log "Error reserving job: #{e.inspect}"
183+
log e.backtrace.join("\n")
184+
raise e
181185
end
182186

183187
# Returns a list of queues to use when searching for a job.

0 commit comments

Comments
 (0)