uwsgi and thread don't play nice
This commit is contained in:
@@ -11,7 +11,9 @@ def send_email(subject, sender, recipients, text_body, html_body):
|
||||
msg = Message(subject, sender=sender, recipients=recipients)
|
||||
msg.body = text_body
|
||||
msg.html = html_body
|
||||
Thread(target=send_async_email, args=(app, msg)).start()
|
||||
mail.send(msg)
|
||||
# Thread works surprisingly badly behind uwsgi, just let a uwsgi worker do its thing instead.
|
||||
#Thread(target=send_async_email, args=(app, msg)).start()
|
||||
|
||||
def send_password_reset_email(user):
|
||||
token = user.get_reset_password_token()
|
||||
|
Reference in New Issue
Block a user