Sha256: b9e3060e1eec9550cd64c8aaabfc841774b9365019f4033967324171d7a474ad
Contents?: true
Size: 509 Bytes
Versions: 14
Compression:
Stored size: 509 Bytes
Contents
module PhobosDBCheckpoint module Middleware class Database def initialize(app, options = {}) @app = app pool_size = options.fetch(:pool_size, PhobosDBCheckpoint::DEFAULT_POOL_SIZE) PhobosDBCheckpoint.configure(pool_size: pool_size) end def call(request_env) ActiveRecord::Base.connection_pool.with_connection do @app.call(request_env) end ensure ActiveRecord::Base.clear_active_connections! end end end end
Version data entries
14 entries across 14 versions & 1 rubygems