File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,11 @@ class Base
8
8
TEN_MINUTES = 60 * 10
9
9
CONNECTION_ERRORS = [
10
10
::Redis ::BaseConnectionError ,
11
- RedisClient ::ConnectionError ,
12
11
::SocketError , # https://github.com/redis/redis-rb/pull/631
13
- ] . freeze
12
+ ]
13
+
14
+ # https://github.com/redis/redis-rb/pull/1312
15
+ CONNECTION_ERRORS << RedisClient ::ConnectionError if defined? ( RedisClient ::ConnectionError )
14
16
15
17
module RedisInstrumentation
16
18
def call ( command , redis_config )
Original file line number Diff line number Diff line change @@ -212,12 +212,10 @@ def push(tests)
212
212
begin
213
213
redis . multi do |transaction |
214
214
transaction . lpush ( key ( 'queue' ) , tests ) unless tests . empty?
215
- transaction . set ( key ( 'total' ) , @total )
216
- transaction . set ( key ( 'master-status' ) , 'ready' )
215
+ transaction . set ( key ( 'total' ) , @total , ex : config . redis_ttl )
216
+ transaction . set ( key ( 'master-status' ) , 'ready' , ex : config . redis_ttl )
217
217
218
218
transaction . expire ( key ( 'queue' ) , config . redis_ttl )
219
- transaction . expire ( key ( 'total' ) , config . redis_ttl )
220
- transaction . expire ( key ( 'master-status' ) , config . redis_ttl )
221
219
end
222
220
rescue ::Redis ::BaseError , RedisClient ::Error => error
223
221
if !queue_initialized? && attempts < 3
You can’t perform that action at this time.
0 commit comments