semian 0.9.1 → 0.10.0
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/semian/redis.rb +22 -0
- data/lib/semian/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdff6d43d1dfd0788850d7c003af564610b347a040cdfe1730d2cbcdc279e000
|
|
4
|
+
data.tar.gz: f4c2746c0d41cc91d06f1f1cc702bfd1e2a3e33b8848fd875d8361785c639b75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b20d975e290f6597150b89b68f94f1cbb213f3b021a7d187151bdb412f548708bc9744c05065a8e541ecb3300ad34d91062c10a0ae6395bcbca82a7093f8ef93
|
|
7
|
+
data.tar.gz: 4f18b1d5f771e49b8567387daeabce1e84f838f4bfd00ccf0e00f4602557f93b5ced88c675f1e210209fcc847de08eb9a9f5f603b74fea8ab9473b442d3e4452
|
data/lib/semian/redis.rb
CHANGED
|
@@ -91,6 +91,28 @@ module Semian
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
+
def with_resource_timeout(temp_timeout)
|
|
95
|
+
timeout = options[:timeout]
|
|
96
|
+
connect_timeout = options[:connect_timeout]
|
|
97
|
+
read_timeout = options[:read_timeout]
|
|
98
|
+
write_timeout = options[:write_timeout]
|
|
99
|
+
|
|
100
|
+
begin
|
|
101
|
+
connection.timeout = temp_timeout if connected?
|
|
102
|
+
options[:timeout] = Float(temp_timeout),
|
|
103
|
+
options[:connect_timeout] = Float(temp_timeout)
|
|
104
|
+
options[:read_timeout] = Float(temp_timeout)
|
|
105
|
+
options[:write_timeout] = Float(temp_timeout)
|
|
106
|
+
yield
|
|
107
|
+
ensure
|
|
108
|
+
options[:timeout] = timeout
|
|
109
|
+
options[:connect_timeout] = connect_timeout
|
|
110
|
+
options[:read_timeout] = read_timeout
|
|
111
|
+
options[:write_timeout] = write_timeout
|
|
112
|
+
connection.timeout = self.timeout if connected?
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
94
116
|
private
|
|
95
117
|
|
|
96
118
|
def resource_exceptions
|
data/lib/semian/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: semian
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Francis
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-12-05 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rake-compiler
|