You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending the emails need to also try/catch the conn.open part so if the connection open fails it can retry all the messages.
...
conn = get_connection(backend=settings.CELERY_EMAIL_BACKEND, **combined_kwargs)
conn.open()
messages_sent = 0
for message in messages:
try:
sent = conn.send_messages([dict_to_email(message)])
if sent is not None:
messages_sent += sent
logger.debug("Successfully sent email message to %r.", message['to'])
except Exception as e:
# Not expecting any specific kind of exception here because it
# could be any number of things, depending on the backend
logger.warning("Failed to send email message to %r, retrying. (%r)",
message['to'], e)
send_emails.retry([[message], combined_kwargs], exc=e, throw=False)
conn.close()
And if there is a SoftTimeLimitExceeded error, it should try cleanup and exit
The text was updated successfully, but these errors were encountered:
When sending the emails need to also try/catch the conn.open part so if the connection open fails it can retry all the messages.
And if there is a SoftTimeLimitExceeded error, it should try cleanup and exit
The text was updated successfully, but these errors were encountered: