Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #52 from davidlmorton/return_after_retry
Browse files Browse the repository at this point in the history
Ensure we return after self.retry
  • Loading branch information
davidlmorton committed Mar 22, 2016
2 parents aaf3407 + a517e09 commit 1d15d5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ptero_common/celery/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def run(self, method, url, **kwargs):
self.request.retries + 1, self.max_retries + 1,
extra={"method": method.upper(), "url": url})
self.retry(throw=False, countdown=delay)
return

if response.status_code in CODES_TO_RETRY:
delay = DELAYS[self.request.retries]
Expand All @@ -51,6 +52,7 @@ def run(self, method, url, **kwargs):
self.max_retries + 1, extra={"method": method.upper(),
"status_code": response.status_code, "url": url})
self.retry(throw=False, countdown=delay)
return

response_info = {
"method": method,
Expand Down

0 comments on commit 1d15d5c

Please sign in to comment.