Module: ResqueQueueable::SingletonMethods
- Defined in:
- lib/resque-queueable.rb
Instance Method Summary collapse
Instance Method Details
#perform(id, method, *args) ⇒ Object
27 28 29 30 31 |
# File 'lib/resque-queueable.rb', line 27 def perform(id, method, *args) # Idle workers lose their DB connection sometimes. This makes sure we have a good connection for each run. ActiveRecord::Base.reconnect! if ActiveRecord::Base.respond_to? :reconnect! find(id).send(method, *args) end |