Skip to content

Commit

Permalink
Sequel: relax Ruby requirement for Timed pool
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fallwith committed Oct 2, 2024
1 parent 1d3c776 commit 2f8d3c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sequel/extensions/new_relic_instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2f8d3c6

Please sign in to comment.