Skip to content

Commit 3df2f15

Browse files
committed
Merge pull request resque#749 from ismailasci/duplicate_reconnect_method
Duplicate reconnect method definition in worker
2 parents 6139e2c + 3e1bdd0 commit 3df2f15

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lib/resque/worker.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -239,24 +239,6 @@ def reconnect
239239
end
240240
end
241241

242-
# Reconnect to Redis to avoid sharing a connection with the parent,
243-
# retry up to 3 times with increasing delay before giving up.
244-
def reconnect
245-
tries = 0
246-
begin
247-
redis.client.reconnect
248-
rescue Redis::BaseConnectionError
249-
if (tries += 1) <= 3
250-
Resque.logger.info "Error reconnecting to Redis; retrying"
251-
sleep(tries)
252-
retry
253-
else
254-
Resque.logger.info "Error reconnecting to Redis; quitting"
255-
raise
256-
end
257-
end
258-
end
259-
260242
# Returns a list of queues to use when searching for a job.
261243
# A splat ("*") means you want every queue (in alpha order) - this
262244
# can be useful for dynamically adding new queues. Low priority queues

0 commit comments

Comments
 (0)