fresh_connection 3.0.1 → 3.0.2.rc1
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 +4 -4
- data/lib/fresh_connection/replica_connection_handler.rb +17 -12
- data/lib/fresh_connection/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25bcda44e7ce090230d6a9c5c678bc634bde70e820d2d1d8c39afb756e511b12
|
|
4
|
+
data.tar.gz: 5bc609443c84cd98fe4115e03e1374fc990c517030c0781b6fad7bd4a6e0c113
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe140f22e1e6001590b5d50513bdce9d2536b12df274f8861bff19f843498ce22eb64d44bb3841bc83eb106472fe3397c33395941a4c45f59f0e7974cda19b97
|
|
7
|
+
data.tar.gz: 40c64b9a4603f32de9fbc7ef2ae194c25427b2fb40b69fca07d8961b033d967aec8ad27c2bd2376db307e058074cbd6a9e000ca49ca70f8c7f11f027a631f9da
|
|
@@ -56,19 +56,24 @@ module FreshConnection
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def detect_connection_manager(spec_name)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
spec_name = spec_name.to_s
|
|
60
|
+
|
|
61
|
+
cm = owner_to_pool[spec_name]
|
|
62
|
+
return cm if cm
|
|
63
|
+
|
|
64
|
+
refresh_connection(spec_name)
|
|
65
|
+
|
|
66
|
+
message_bus = ActiveSupport::Notifications.instrumenter
|
|
67
|
+
payload = {
|
|
68
|
+
connection_id: object_id,
|
|
69
|
+
spec_name: spec_name
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message_bus.instrument("!connection.active_record", payload) do
|
|
73
|
+
cm = FreshConnection.connection_manager.new(spec_name)
|
|
71
74
|
end
|
|
75
|
+
|
|
76
|
+
owner_to_pool[spec_name] = cm
|
|
72
77
|
end
|
|
73
78
|
|
|
74
79
|
def owner_to_pool
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fresh_connection
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tsukasa OISHI
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-06-
|
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -251,9 +251,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
251
251
|
version: '2.2'
|
|
252
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
requirements:
|
|
254
|
-
- - "
|
|
254
|
+
- - ">"
|
|
255
255
|
- !ruby/object:Gem::Version
|
|
256
|
-
version:
|
|
256
|
+
version: 1.3.1
|
|
257
257
|
requirements: []
|
|
258
258
|
rubyforge_project:
|
|
259
259
|
rubygems_version: 2.7.6
|