Skip to content

Use tenacity (or similar) instead of re-implementing a retry function #1234

@marco-c

Description

@marco-c

We are currently implementing

bugbug/bugbug/utils.py

Lines 202 to 211 in c84c38f

def retry(operation, retries=5, wait_between_retries=30):
while True:
try:
return operation()
except Exception:
retries -= 1
if retries == 0:
raise
time.sleep(wait_between_retries)
and using it in a few places.
We should instead use a library (e.g. tenacity) and remove this custom retry function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions