tzispa_data 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/tzispa/data/adapter.rb +7 -1
- data/lib/tzispa/data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01f0dadd4b7adc9d99c80f8f394ba1524be42acf
|
4
|
+
data.tar.gz: b3faf8c93ce0ffa0ba43d3e9c43e2d2bfc986079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88c26dcb9256d4ad41f8c06249e9b0d0f3ad9c673c0060d9542bd57ae7eb44053cf7a6a04ecc1bfbb163ca70763f1c9e39615d0ad643173751027d87d3e16fe
|
7
|
+
data.tar.gz: 1493679c1e6cec07fb809e09548092696a9182bb99602671f3ae05667ea88c68f886c4f8cf8811416b8c2eef79637726f3180040f80a197db4c08e3a6bb889df
|
data/CHANGELOG.md
CHANGED
data/lib/tzispa/data/adapter.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'sequel'
|
2
|
+
require 'sequel/connection_pool/threaded'
|
2
3
|
require 'forwardable'
|
3
4
|
|
4
5
|
module Tzispa
|
@@ -18,7 +19,12 @@ module Tzispa
|
|
18
19
|
@default = default || config.first[0].to_sym
|
19
20
|
@pool = Hash.new.tap { |hpool|
|
20
21
|
config.each { |key, value|
|
21
|
-
|
22
|
+
conn = Sequel.connect value.adapter, :pool_class => Sequel::ThreadedConnectionPool
|
23
|
+
if value.connection_validation
|
24
|
+
conn.extension(:connection_validator)
|
25
|
+
conn.pool.connection_validation_timeout = value.connection_validation_timeout
|
26
|
+
end
|
27
|
+
hpool[key.to_sym] = conn
|
22
28
|
}
|
23
29
|
}
|
24
30
|
end
|
data/lib/tzispa/data/version.rb
CHANGED