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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 996db8e16912d190a81d140e345c55a46420f14d
4
- data.tar.gz: 3897ef6ce90ae2481a6e91d2dd6dec4ed4950151
3
+ metadata.gz: 8c40aa1b922ad9c795bbf1d71ac33915b8827b36
4
+ data.tar.gz: 39001f699d6594000fbec430c3be0fb9d8fa4f3e
5
5
  SHA512:
6
- metadata.gz: 92616a7e384cfff1f1d2b94291028a9dc55e6c74f278773c05f6d94e41d020f342794eb0d38abd0fa04d7521345c09d10b24173b8f47f712bf5592da616484b5
7
- data.tar.gz: 133f8c55a32529771afb0eb2bb814af8710b4b3271190cb188c4de9a30421ffde51dfc010784865f11456ce7e7b3de2003b54d555ec5a7c364eb829396e14ea2
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
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  class Pool
3
3
  class Lifeguard
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
6
6
  end
7
7
  end
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.0
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-03-24 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque