maybe_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/maybe_client.rb +3 -3
- 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: 72307aa6f31077fd646f25b52df9050302e56c9b
|
4
|
+
data.tar.gz: 5592b6ed8396e6819358ce8a14ea7fe235695093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1357a14aee1a7f48e6d3607158c6b217eb25bed97198c61ba1612a468da42a7e3836ae810db11ffca7534b127e0932ae470df3fb6b4e97110f17ec0f1a6f394
|
7
|
+
data.tar.gz: 35a902e03945a3e3e9c41788a3ef105f578e1f6f31be8a3d97fc6237752016350ece0f0e788efaa5a2307a5b13cf5e662fbd924c12d005835381597e935466e9
|
data/lib/maybe_client.rb
CHANGED
@@ -27,7 +27,7 @@ class MaybeClient
|
|
27
27
|
@fail_at = nil
|
28
28
|
result = @client.send(method, *args)
|
29
29
|
rescue Exception => e
|
30
|
-
handle_exception
|
30
|
+
handle_exception(e)
|
31
31
|
end
|
32
32
|
|
33
33
|
result
|
@@ -38,7 +38,7 @@ class MaybeClient
|
|
38
38
|
@fail_at && @fail_at + DELAY > Time.now
|
39
39
|
end
|
40
40
|
|
41
|
-
def handle_exception
|
41
|
+
def handle_exception(e)
|
42
42
|
@fail_at = Time.now
|
43
43
|
end
|
44
44
|
|
@@ -46,7 +46,7 @@ class MaybeClient
|
|
46
46
|
begin
|
47
47
|
@client = @client_class.new(*@connect_params)
|
48
48
|
rescue Exception => e
|
49
|
-
handle_exception
|
49
|
+
handle_exception(e)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|