11 lines
227 B
Ruby
11 lines
227 B
Ruby
|
|
require 'resque'
|
||
|
|
class ResqueJamError < Resque::Failure::Base
|
||
|
|
|
||
|
|
def save
|
||
|
|
if DbUtil.bad_conn_exception?(self.exception)
|
||
|
|
puts "RECONNECTING TO DATABASE"
|
||
|
|
ActiveRecord::Base.connection.reconnect!
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|