active_record_host_pool 0.8.2 → 0.8.3

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
  SHA1:
3
- metadata.gz: 42877750a4d57f5cac5b36b8097d4a706a0397c4
4
- data.tar.gz: b1826587627390ef41e4735cedb65aedb383c47b
3
+ metadata.gz: 1c38ebceb4621733f8beab2187309bdd60bbf207
4
+ data.tar.gz: 3eb2efdc2264d85149ba5aec4e975e844a7b2344
5
5
  SHA512:
6
- metadata.gz: 49e8b4607fbaa06e00a281b6cf5d2cae4265ba02b34ebbcc2f6af0d2c6d353b698b9ae68ecb4abc474fcd9ee855aa0c67cd82342bdf85d1ba9fbe1a5c5bfcb5e
7
- data.tar.gz: 8e8a120c71e1d04810e01d01d44e1983f7bef96626630dbaabb1a67f4e94c3b955376af973e372e7e87391396914b920e7fc9d83feccc801fc33b1b7110c5796
6
+ metadata.gz: 5a8dd74cc7cc9a89c220169d9f1999098bdb1a598e07be23a0aaa5fd2e510183e279c6533959fdad9099dabbda320e23dbc28a1a5ffece68547300eb40de1110
7
+ data.tar.gz: 64782949403041135a1cdcae145374cff83f6e347d825ef797e661535d30d857897076d1844b383fa44436d1407b908ee51bfc9fed636d9ee0ca04a6ebc173a6
@@ -66,11 +66,17 @@ module ActiveRecordHostPool
66
66
  def disconnect!
67
67
  p = _connection_pool(false)
68
68
  return unless p
69
- _connection_pool.disconnect!
70
- _connection_pool.automatic_reconnect = true if _connection_pool.respond_to?(:automatic_reconnect=)
69
+ p.disconnect!
70
+ p.automatic_reconnect = true if p.respond_to?(:automatic_reconnect=)
71
71
  _clear_connection_proxy_cache
72
72
  end
73
73
 
74
+ def automatic_reconnect=(value)
75
+ p = _connection_pool(false)
76
+ return unless p
77
+ p.automatic_reconnect = value if p.respond_to?(:automatic_reconnect=)
78
+ end
79
+
74
80
  def clear_reloadable_connections!
75
81
  _connection_pool.clear_reloadable_connections!
76
82
  _clear_connection_proxy_cache
data/test/database.yml CHANGED
@@ -54,4 +54,3 @@ test_host_1_db_not_there:
54
54
  password:
55
55
  host: 127.0.0.1
56
56
  reconnect: true
57
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_host_pool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Osheroff