mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix the no retry on client error
This commit is contained in:
parent
012b85283e
commit
f7f2a8994f
1 changed files with 1 additions and 0 deletions
1
tasks.py
1
tasks.py
|
@ -151,6 +151,7 @@ def fetch_og_metadata(self, iri: str) -> None:
|
||||||
except requests.exceptions.HTTPError as http_err:
|
except requests.exceptions.HTTPError as http_err:
|
||||||
if 400 <= http_err.response.status_code < 500:
|
if 400 <= http_err.response.status_code < 500:
|
||||||
log.exception("bad request, no retry")
|
log.exception("bad request, no retry")
|
||||||
|
return
|
||||||
log.exception("failed to fetch OG metadata")
|
log.exception("failed to fetch OG metadata")
|
||||||
self.retry(
|
self.retry(
|
||||||
exc=http_err, countdown=int(random.uniform(2, 4) ** self.request.retries)
|
exc=http_err, countdown=int(random.uniform(2, 4) ** self.request.retries)
|
||||||
|
|
Loading…
Reference in a new issue