Class: Sidekiq::Middleware::Server::ActiveRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/middleware/server/active_record.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object



5
6
7
8
9
# File 'lib/sidekiq/middleware/server/active_record.rb', line 5

def call(*args)
  yield
ensure
  ::ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord)
end