Skip to content

Commit

Permalink
cap connection wait time at 60
Browse files Browse the repository at this point in the history
  • Loading branch information
corynezin committed Jan 9, 2021
1 parent bd42136 commit 704083d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ def dequeue_job_and_maintain_ttl(self, timeout):
conn_err, connection_wait_time)
time.sleep(connection_wait_time)
connection_wait_time *= self.exponential_backoff_factor
connection_wait_time = min(connection_wait_time, 60)
else:
connection_wait_time = 1.0

Expand Down

0 comments on commit 704083d

Please sign in to comment.