Class: NoBrainer::QueryRunner::Reconnect

Inherits:
Middleware
  • Object
show all
Defined in:
lib/no_brainer/query_runner/reconnect.rb

Instance Method Summary collapse

Methods inherited from Middleware

#initialize

Constructor Details

This class inherits a constructor from NoBrainer::QueryRunner::Middleware

Instance Method Details

#call(env) ⇒ Object



2
3
4
5
6
7
# File 'lib/no_brainer/query_runner/reconnect.rb', line 2

def call(env)
  @runner.call(env)
rescue StandardError => e
  NoBrainer.disconnect if is_connection_error_exception?(e)
  raise
end