Create spooler.py

This commit is contained in:
Chris Hutchison 2018-04-20 16:28:57 -04:00 committed by GitHub
parent 95dbb40c01
commit 7611ac70dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
isso/ext/spooler.py Normal file
View File

@ -0,0 +1,10 @@
def spooler(args):
try:
self._sendmail(args[b"subject"].decode("utf-8"),
args["body"].decode("utf-8"))
except smtplib.SMTPConnectError:
return uwsgi.SPOOL_RETRY
else:
return uwsgi.SPOOL_OK
uwsgi.spooler = spooler