Class: Totoro::MessageResender
- Inherits:
-
Object
- Object
- Totoro::MessageResender
- Includes:
- Delayed::RecurringJob
- Defined in:
- lib/totoro/message_resender.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/totoro/message_resender.rb', line 10 def perform Totoro::Queue.connection Totoro::TotoroFailedMessage.find_in_batches(batch_size: 100) do || .each do |m| m.class_name.constantize.enqueue(m.queue_id, m.payload) m.destroy end end rescue Bunny::TCPConnectionFailedForAllHosts => error Rails.logger.error error. STDOUT.flush end |