From 2f8d3c69f2391e77d8fe5a870c765724e111cd6c Mon Sep 17 00:00:00 2001 From: fallwith Date: Wed, 2 Oct 2024 16:50:28 -0700 Subject: [PATCH] Sequel: relax Ruby requirement for Timed pool Accommodate Sequel v5.85.0, which has made the timed connection pool the default for Ruby 3.2+ by always permitting the use of a timed connection pool for explain plan generation in a Ruby 3.2+ context (previously only a Ruby 3.4+ context would work). https://sequel.jeremyevans.net/rdoc/files/doc/release_notes/5_85_0_txt.html#label-Other+Improvements --- lib/sequel/extensions/new_relic_instrumentation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sequel/extensions/new_relic_instrumentation.rb b/lib/sequel/extensions/new_relic_instrumentation.rb index 11a465b7af..13602c11ac 100644 --- a/lib/sequel/extensions/new_relic_instrumentation.rb +++ b/lib/sequel/extensions/new_relic_instrumentation.rb @@ -79,7 +79,7 @@ def notice_sql(sql) THREAD_SAFE_CONNECTION_POOL_CLASSES = [ (defined?(::Sequel::ThreadedConnectionPool) && ::Sequel::ThreadedConnectionPool), - (defined?(::Sequel::TimedQueueConnectionPool) && RUBY_VERSION >= '3.4' && ::Sequel::TimedQueueConnectionPool) + (defined?(::Sequel::TimedQueueConnectionPool) && RUBY_VERSION >= '3.2' && ::Sequel::TimedQueueConnectionPool) ].compact.freeze def explainer_for(sql)