mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
13 lines
258 B
Ruby
13 lines
258 B
Ruby
module Sidekiq
|
|
module Middleware
|
|
module Server
|
|
class ActiveRecord
|
|
def call(*args)
|
|
yield
|
|
ensure
|
|
::ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|