resque-pool-lifeguard 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resque/pool/lifeguard.rb +5 -1
- data/lib/resque/pool/lifeguard/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: 8c40aa1b922ad9c795bbf1d71ac33915b8827b36
|
4
|
+
data.tar.gz: 39001f699d6594000fbec430c3be0fb9d8fa4f3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a68546e141cf03bcda55aff3575ffcc358730c14e810262b69f6b632f0ec365c62ebe9de1cd622232dc375543f0f43057b9ec1ad95264e3cae0a44c6b9551a10
|
7
|
+
data.tar.gz: 9d5f8bffac027e54d06f5561be798477774da9c8f48e9761977c620b5718bb181ad589df832c22d2d5032451164b61b9029a90cfebca8188a06192da88bd1ca7
|
@@ -4,6 +4,7 @@ require "resque/pool/lifeguard/version"
|
|
4
4
|
module Resque
|
5
5
|
class Pool
|
6
6
|
class Lifeguard
|
7
|
+
include Logging
|
7
8
|
|
8
9
|
def initialize hostname: Socket.gethostname, defaults: -> (env) { {} }
|
9
10
|
@defaults = defaults
|
@@ -29,7 +30,7 @@ module Resque
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def call env
|
32
|
-
values || set_defaults(env)
|
33
|
+
@values = values || set_defaults(env)
|
33
34
|
end
|
34
35
|
|
35
36
|
def reset!
|
@@ -41,6 +42,9 @@ module Resque
|
|
41
42
|
rescue Resque::Helpers::DecodeException
|
42
43
|
reset!
|
43
44
|
nil
|
45
|
+
rescue Redis::TimeoutError, Redis::CannotConnectError
|
46
|
+
log "Could not get config from redis"
|
47
|
+
@values
|
44
48
|
end
|
45
49
|
|
46
50
|
def values= values
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-pool-lifeguard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike MacDonald
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: resque
|