Sha256: bc551a9d54761f9b0294234c5736f4fc940e03654934a2f78cea48e836bff8a2
Contents?: true
Size: 518 Bytes
Versions: 2
Compression:
Stored size: 518 Bytes
Contents
module PhobosDBCheckpoint module Middleware class Database def initialize(app, options = {}) @app = app PhobosDBCheckpoint.deprecate('options are deprecated, use configuration files instead') if options.keys.any? PhobosDBCheckpoint.configure 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phobos_db_checkpoint-3.3.0 | lib/phobos_db_checkpoint/middleware/database.rb |
phobos_db_checkpoint-3.2.0 | lib/phobos_db_checkpoint/middleware/database.rb |