No commit activity in last 3 years
No release in over 3 years
reconnect after checkout in order to DB failover
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

 Project Readme

Gem Version

ActiverecordReconnectAfterCheckout

This Gem is auto reconnect with DB on each checkout a connection from ActiveRecord's connection pool.

Installation

Add this line to your application's Gemfile:

gem 'activerecord_reconnect_after_checkout'

And then execute:

$ bundle

Use on any middlewares

This Gem depends only on ActiveRecord. It works also with Rails, Sinatra, sidekiq etc.

Reconnecting when checkout a connection.

This Gem uses checkout callback of ActiveRecord::ConnectionAdapters::AbstractAdapter. then execute AbstractAdapter#reconnect whenever a callback is called.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/potato2003/activerecord_reconnect_after_checkout.