implement mailer with task queue

This commit is contained in:
dandds
2018-10-11 14:58:33 -04:00
parent 0d9f1cd7e0
commit f7d8783349
7 changed files with 106 additions and 61 deletions

9
atst/queue.py Normal file
View File

@@ -0,0 +1,9 @@
from flask_rq2 import RQ
from flask import current_app as app
queue = RQ()
@queue.job
def send_mail(to, subject, body):
app.mailer.send(to, subject, body)