allq 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/allq/client.rb +4 -2
- data/lib/allq/connection.rb +2 -4
- data/lib/allq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ff857d6bda5cfd924c2eb62558109943dca3c2
|
4
|
+
data.tar.gz: c9b4322c7c42267feb15d21e7c4727e0c49c27d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f20df44f27df123c4dd18985f8269dada9dc38843a958759b8679386f4cfe35cdb5686b5958521ec48ffa2d7ca1c65694df60df1a47d7635cadfad8a53f9bd2
|
7
|
+
data.tar.gz: bf00bb256bdce080556159f2b3ec1205d9456581247c3fa434f84debf63518082df4ec90d3c779a21b790f049a2e2841560f20fc0789053bdb035f426f5d2fa9
|
data/lib/allq/client.rb
CHANGED
@@ -6,8 +6,10 @@ class AllQ
|
|
6
6
|
include Singleton
|
7
7
|
|
8
8
|
URL = ENV['ALLQ_CLIENT_URL'] || '127.0.0.1:7766'
|
9
|
-
def initialize
|
10
|
-
|
9
|
+
def initialize(url)
|
10
|
+
url = URL if url.nil?
|
11
|
+
|
12
|
+
@connection = AllQ::Connection.new(url)
|
11
13
|
@get_action = AllQ::Get.new(@connection)
|
12
14
|
@put_action = AllQ::Put.new(@connection)
|
13
15
|
@done_action = AllQ::Done.new(@connection)
|
data/lib/allq/connection.rb
CHANGED
@@ -106,9 +106,7 @@ class AllQ
|
|
106
106
|
#
|
107
107
|
def _with_retry(retry_interval, init=true, tries=MAX_RETRIES, &block)
|
108
108
|
yield
|
109
|
-
rescue
|
110
|
-
Errno::ECONNREFUSED => ex
|
111
|
-
|
109
|
+
rescue => ex
|
112
110
|
_reconnect(ex, retry_interval)
|
113
111
|
retry
|
114
112
|
end
|
@@ -144,7 +142,7 @@ class AllQ
|
|
144
142
|
# Raises an error to be triggered when the connection has failed
|
145
143
|
# @raise [AllQ::NotConnected] AllQ is no longer connected
|
146
144
|
def _raise_not_connected!
|
147
|
-
raise
|
145
|
+
raise "Connection to allq '#{@host}:#{@port}' is closed!"
|
148
146
|
end
|
149
147
|
|
150
148
|
end # Connection
|
data/lib/allq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|