Fix the no retry on client error

master
Thomas Sileo 2018-07-23 23:50:22 +02:00
rodzic 012b85283e
commit f7f2a8994f
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -151,6 +151,7 @@ def fetch_og_metadata(self, iri: str) -> None:
except requests.exceptions.HTTPError as http_err:
if 400 <= http_err.response.status_code < 500:
log.exception("bad request, no retry")
return
log.exception("failed to fetch OG metadata")
self.retry(
exc=http_err, countdown=int(random.uniform(2, 4) ** self.request.retries)