switchman 1.11.4 → 1.11.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 +5 -5
- data/lib/switchman/connection_pool_proxy.rb +10 -6
- data/lib/switchman/version.rb +1 -1
- metadata +3 -4
- data/db/shard_1708.sqlite3 +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6083a58473cad8269f0d2661c15708a904613b3d757dd2de0585e4ef404fc0e1
|
|
4
|
+
data.tar.gz: 9a42fb4e9ace95194e0c1557fd717379e9a14de7d19ffd106d6ab5ec038c1a90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ee490b1bc3a156aee2c7d8ba458a29a160e35172d4cc19b1529b48c6ffb6a87a436241d2b970617e243af1a0eb626d99d71ad9425da12dd1c649d102c521b95
|
|
7
|
+
data.tar.gz: 24ccd7ef87aaed9533045258087c6c25fc23ecc5861248a9c8bad047355d97c1110ca4f3dccf860160d7f4417316850f4429af214b32ca70f849dab49f5996ee
|
|
@@ -43,7 +43,7 @@ module Switchman
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def connections
|
|
46
|
-
|
|
46
|
+
connection_pools.map(&:connections).inject([], &:+)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def connection
|
|
@@ -77,23 +77,27 @@ module Switchman
|
|
|
77
77
|
clear_stale_cached_connections!
|
|
78
78
|
enable_query_cache!
|
|
79
79
|
disable_query_cache! }.each do |method|
|
|
80
|
-
class_eval(<<-
|
|
80
|
+
class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
|
|
81
81
|
def #{method}
|
|
82
|
-
|
|
82
|
+
connection_pools.each(&:#{method})
|
|
83
83
|
end
|
|
84
|
-
|
|
84
|
+
RUBY
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def automatic_reconnect=(value)
|
|
88
|
-
|
|
88
|
+
connection_pools.each { |pool| pool.automatic_reconnect = value }
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def clear_idle_connections!(since_when)
|
|
92
|
-
|
|
92
|
+
connection_pools.each { |pool| pool.clear_idle_connections!(since_when) }
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
protected
|
|
96
96
|
|
|
97
|
+
def connection_pools
|
|
98
|
+
(@connection_pools.values + [default_pool]).uniq
|
|
99
|
+
end
|
|
100
|
+
|
|
97
101
|
def pool_key
|
|
98
102
|
[active_shackles_environment,
|
|
99
103
|
active_shard.database_server.shareable? ? active_shard.database_server.pool_key : active_shard]
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: switchman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.11.
|
|
4
|
+
version: 1.11.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cody Cutrer
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: railties
|
|
@@ -177,7 +177,6 @@ files:
|
|
|
177
177
|
- db/migrate/20130328212039_create_switchman_shards.rb
|
|
178
178
|
- db/migrate/20130328224244_create_default_shard.rb
|
|
179
179
|
- db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
|
|
180
|
-
- db/shard_1708.sqlite3
|
|
181
180
|
- lib/switchman.rb
|
|
182
181
|
- lib/switchman/action_controller/caching.rb
|
|
183
182
|
- lib/switchman/active_record/abstract_adapter.rb
|
|
@@ -244,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
244
243
|
version: '0'
|
|
245
244
|
requirements: []
|
|
246
245
|
rubyforge_project:
|
|
247
|
-
rubygems_version: 2.
|
|
246
|
+
rubygems_version: 2.7.3
|
|
248
247
|
signing_key:
|
|
249
248
|
specification_version: 4
|
|
250
249
|
summary: Rails 4 sharding magic
|
data/db/shard_1708.sqlite3
DELETED
|
File without changes
|