Skip to content

Commit a87077f

Browse files
committed
Add more info to docstring.
1 parent 77510ab commit a87077f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pyres/failure/mail.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,26 @@ class MailBackend(BaseBackend):
1616
from pyres.failure.redis import RedisBackend
1717
1818
class EmailFailure(MailBackend):
19+
subject = 'Pyres Failure on {queue}'
1920
from_user = 'My Email User <[email protected]>'
2021
recipients = ['Me <[email protected]>']
2122
2223
smtp_host = 'mail.mydomain.tld'
24+
smtp_port = 25
25+
smtp_tls = True
26+
2327
smtp_user = 'mailuser'
2428
smtp_password = 'm41lp455w0rd'
2529
2630
failure.backend = MultipleBackend
2731
failure.backend.classes = [RedisBackend, EmailFailure]
32+
33+
34+
Additional notes:
35+
- The following tokens are available in subject: queue, worker, exception
36+
37+
- Override the create_message method to provide an alternate body. It
38+
should return one of the message types from email.mime.*
2839
"""
2940
subject = 'Pyres Failure on {queue}'
3041

0 commit comments

Comments
 (0)