resilient_reads 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56b29303c6173728af9204eaa7b2b4c2ed73a5b6d7e6e3100d8e23bbc2afc2ae
4
- data.tar.gz: 813d2268fd80a7835c2c4744eca2f4a6f879645049305ec02df71443b8329d47
3
+ metadata.gz: d9a7b3f39e250957ac840a69af135911e9e466e1c1a656eaf965701b63cb5e9b
4
+ data.tar.gz: 14c6ca6f9bd822cafc53e3cfa39562284ca4fffa3e2f8169ae0684fbac7ea1bf
5
5
  SHA512:
6
- metadata.gz: 32e222767e097b4735a534a2cf4f1be7edc4e15214e3ccdcb1135c277170023d134228fea85efe0068882ed6a9549e961f9d8cc8270dc71ca371c7ae7a83dc5e
7
- data.tar.gz: 7e4da86bf77656e5b948446314f2841ce1aa64f4ef01cb980ad5b59eb678cf8291b335d6372d63cdf2a9f90dcb90f446a8caf91b6e7c692e1a2c9f0dcf4fd5b3
6
+ metadata.gz: 959af6f366c6bd99e6e37570c450b30746c197a87daa2448b83549cf53b166782e3e73582a740f346768e10d98e84f0bd5424cac39477fbeab630a90f1be0fe3
7
+ data.tar.gz: 7b001e842fb6828491541f565a71b8a952a0435a4ad5de9faafe38076519196a858aa17f1113c9309479711fda07eaf0b2a8f8aa0d26da35a5495fedb0f8b21d
@@ -85,8 +85,16 @@ module ResilientReads
85
85
  end
86
86
 
87
87
  # Verify the replica is reachable. Returns true/false and updates health.
88
+ # Uses the raw connection to avoid ActiveRecord SQL instrumentation/logging.
88
89
  def check_health!
89
- @connection_class.connection.execute("SELECT 1")
90
+ raw = @connection_class.connection.raw_connection
91
+ if raw.respond_to?(:exec) # PG::Connection
92
+ raw.exec("SELECT 1")
93
+ elsif raw.respond_to?(:ping) # Mysql2::Client / Trilogy
94
+ raw.ping
95
+ else
96
+ @connection_class.connection.execute("SELECT 1")
97
+ end
90
98
  mark_healthy!
91
99
  true
92
100
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module ResilientReads
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -111,7 +111,7 @@ module ResilientReads
111
111
  logger = config.logger
112
112
  return unless logger
113
113
 
114
- logger.public_send(level, "[ResilientReads] #{message}")
114
+ # logger.public_send(level, "[ResilientReads] #{message}")
115
115
  rescue
116
116
  # Never let logging break query flow.
117
117
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resilient_reads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Puckett
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
10
+ date: 2026-06-19 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Distribute database reads across multiple replicas in Rails with automatic
13
13
  load balancing, health checking, and graceful failover to primary.
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.6.9
62
+ rubygems_version: 3.6.2
63
63
  specification_version: 4
64
64
  summary: Distribute database reads across multiple replicas in Rails with automatic
65
65
  load balancing, health checking, and graceful failover to primary.