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
88 TEN_MINUTES = 60 * 10
99 CONNECTION_ERRORS = [
1010 ::Redis ::BaseConnectionError ,
11- RedisClient ::ConnectionError ,
1211 ::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 )
1416
1517 module RedisInstrumentation
1618 def call ( command , redis_config )
Original file line number Diff line number Diff line change @@ -212,12 +212,10 @@ def push(tests)
212212 begin
213213 redis . multi do |transaction |
214214 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 )
217217
218218 transaction . expire ( key ( 'queue' ) , config . redis_ttl )
219- transaction . expire ( key ( 'total' ) , config . redis_ttl )
220- transaction . expire ( key ( 'master-status' ) , config . redis_ttl )
221219 end
222220 rescue ::Redis ::BaseError , RedisClient ::Error => error
223221 if !queue_initialized? && attempts < 3
You can’t perform that action at this time.
0 commit comments