Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Timeout Exeption
Browse files Browse the repository at this point in the history
Emmanuel Lopez committed Aug 23, 2021
1 parent a79f8fc commit 837c86a
Showing 3 changed files with 24 additions and 2 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

Use this template:
```
## YYYY-MM-DD
### Added
- Something added
### Changed
- Something changed
### Removed
- Something removed
```

## 2021-08-13
### Added
- Added exception Timeout.
3 changes: 2 additions & 1 deletion ax3_email/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from smtplib import SMTPException, SMTPServerDisconnected
from requests.exceptions import RequestException

from huey.contrib.djhuey import task

@@ -21,7 +22,7 @@ def _async_send_messages(serializable_email_messages, retries=RETRIES):
if sent is not None:
count += 1
logger.info('Email sent to %s', message.to)
except (SMTPException, SMTPServerDisconnected) as exc:
except (SMTPException, SMTPServerDisconnected, RequestException) as exc:
if retries > 0:
_async_send_messages.schedule(kwargs={
'serializable_email_messages': [_serialize_email_message(message)],
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

from setuptools import find_packages, setup

__VERSION__ = '1.0.7'
__VERSION__ = '1.0.8'

with open('README.md', 'r') as fh:
long_description = fh.read()

0 comments on commit 837c86a

Please sign in to comment.