Class: Superbolt::Runner::Pg

Inherits:
AckOne show all
Defined in:
lib/superbolt/runner/pg.rb

Instance Attribute Summary

Attributes inherited from Base

#block, #error_notifier, #logger, #queue

Instance Method Summary collapse

Methods inherited from AckOne

#ack, #prefetch

Methods inherited from Default

#ack, #prefetch, #processor_class, #run, #set_prefetch, #subscribe

Methods inherited from Base

#channel, #initialize

Constructor Details

This class inherits a constructor from Superbolt::Runner::Base

Instance Method Details

#on_error(message, error) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/superbolt/runner/pg.rb', line 4

def on_error(message, error)
  if reconnect_after_error?(error)
    ActiveRecord::Base.connection.reconnect!
  end

  super
end