Skip to content

Commit

Permalink
Try auto retrying instead of manually retrying
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed May 23, 2024
1 parent 0c52435 commit 01b2716
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/olympia/amo/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
log = olympia.core.logger.getLogger('z.task')


@task
@task(autoretry_for=Exception)
def send_email(recipient, subject, message, from_email=None,
html_message=None, attachments=None, real_email=False,
cc=None, headers=None, max_retries=3, reply_to=None,
Expand All @@ -35,7 +35,6 @@ def send_email(recipient, subject, message, from_email=None,
return True
except Exception as e:
log.exception('send_mail() failed with error: %s, retrying' % e)
return send_email.retry(exc=e, max_retries=max_retries)


@task
Expand Down

0 comments on commit 01b2716

Please sign in to comment.