Class: Sidekiq::ActiveRecord
- Inherits:
-
Object
- Object
- Sidekiq::ActiveRecord
- Defined in:
- lib/sidekiq/middleware.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options = nil) ⇒ ActiveRecord
constructor
A new instance of ActiveRecord.
Constructor Details
#initialize(options = nil) ⇒ ActiveRecord
Returns a new instance of ActiveRecord.
80 81 |
# File 'lib/sidekiq/middleware.rb', line 80 def initialize(=nil) end |
Instance Method Details
#call ⇒ Object
83 84 85 86 87 |
# File 'lib/sidekiq/middleware.rb', line 83 def call(*) yield ensure ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord) end |