Skip to content

Commit

Permalink
Address #connection deprecation in favor of #lease_connection
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-collier committed Nov 10, 2024
1 parent 7a14202 commit b2e2cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/health_monitor/providers/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def check!
failed_databases = []

ActiveRecord::Base.connection_handler.connection_pool_list(:all).each do |cp|
cp.connection.execute('SELECT 1')
cp.lease_connection.execute('SELECT 1')
rescue Exception
failed_databases << cp.db_config.name
end
Expand Down

0 comments on commit b2e2cb0

Please sign in to comment.