replica_pools 2.4.2 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5266f3b52cb6ff8d9e54175b60ee4938a2765ac08fc5c1a09af659b8a93d61f4
|
4
|
+
data.tar.gz: ad735b62e57f38f238941e579b106f744c41db7b2985d9a7044fd4fa3f738227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8a5292802eab9a70512d8e91b6838556614f35c43efd3d277c54b838e913168980bfbab0dedfd961ab55e4a0dc1b65f5422ee0cb3f4afddacc923d3a75b26e7
|
7
|
+
data.tar.gz: 9c7e5fa395316788a77e836a82a83a1e6141df829ea573539421e95e8d4b3ade55e6588afd85990dbbc2101fc519006312c022f1ad1524e1f74dc4e25a19fa2d
|
@@ -20,7 +20,7 @@ module ReplicaPools
|
|
20
20
|
# Make sure transactions run on leader
|
21
21
|
# Even if they're initiated from ActiveRecord::Base
|
22
22
|
# (which doesn't have our hijack).
|
23
|
-
def transaction(options
|
23
|
+
def transaction(**options, &block)
|
24
24
|
if self.connection.kind_of?(ConnectionProxy)
|
25
25
|
super
|
26
26
|
else
|
@@ -101,9 +101,9 @@ module ReplicaPools
|
|
101
101
|
leader_depth > 0
|
102
102
|
end
|
103
103
|
|
104
|
-
def route_to(conn, method, *args, &block)
|
104
|
+
def route_to(conn, method, *args, **keyword_args, &block)
|
105
105
|
raise ReplicaPools::LeaderDisabled.new if ReplicaPools.config.disable_leader && conn == leader
|
106
|
-
conn.retrieve_connection.send(method, *args, &block)
|
106
|
+
conn.retrieve_connection.send(method, *args, **keyword_args, &block)
|
107
107
|
rescue => e
|
108
108
|
ReplicaPools.log :error, "Error during ##{method}: #{e}"
|
109
109
|
log_proxy_state
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: replica_pools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Drabik
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -158,14 +158,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '1.2'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.2.33
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Connection proxy for ActiveRecord for leader / replica setups.
|
165
165
|
test_files:
|
166
|
-
- spec/spec_helper.rb
|
167
|
-
- spec/pool_spec.rb
|
168
|
-
- spec/slave_pools_spec.rb
|
169
166
|
- spec/config/test_model.rb
|
170
|
-
- spec/query_cache_spec.rb
|
171
167
|
- spec/connection_proxy_spec.rb
|
168
|
+
- spec/pool_spec.rb
|
169
|
+
- spec/query_cache_spec.rb
|
170
|
+
- spec/slave_pools_spec.rb
|
171
|
+
- spec/spec_helper.rb
|