From b2e2cb0ce0ff6c11ca191e6568608868fd250625 Mon Sep 17 00:00:00 2001 From: Aaron Collier Date: Sun, 10 Nov 2024 13:55:04 -0800 Subject: [PATCH] Address #connection deprecation in favor of #lease_connection --- lib/health_monitor/providers/database.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/health_monitor/providers/database.rb b/lib/health_monitor/providers/database.rb index b7c957fe..8049b0a1 100644 --- a/lib/health_monitor/providers/database.rb +++ b/lib/health_monitor/providers/database.rb @@ -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