relax-rb 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relax/base.rb +6 -2
- data/lib/relax/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: f069ff4029b634f6c2f18e2069a6a50c6a2d7441
|
4
|
+
data.tar.gz: 100010406406dfe03359c57065a09cef4d5267fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e06a343fd1ec7c264213abcf65ef6a6fb250b5ea00e511c676ec998bee6955e835b5e1b3e53e2cd7e47f9a6d008c2ceeea2678d7bbdbba77b3d05224058201aa
|
7
|
+
data.tar.gz: 638c4ba842b0f5d874f942f73f0d51774694dda8b09dcc0afcfc3bf36c9a95706fe6b3db25c3f7e5c91700bf63ffd8651cbeb3647139a7fb669543ee25bb7fbc
|
data/lib/relax/base.rb
CHANGED
@@ -9,9 +9,13 @@ module Relax
|
|
9
9
|
redis_uri = URI.parse("redis://localhost:6379")
|
10
10
|
end
|
11
11
|
|
12
|
-
@@conn
|
13
|
-
|
12
|
+
if !defined?(@@conn)
|
13
|
+
@@conn = ConnectionPool.new(timeout: 1, size: 2) do
|
14
|
+
Redis.new(url: redis_uri, db: 0)
|
15
|
+
end
|
14
16
|
end
|
17
|
+
|
18
|
+
@@conn
|
15
19
|
end
|
16
20
|
end
|
17
21
|
end
|
data/lib/relax/version.rb
CHANGED