uwsgi and thread don't play nice
This commit is contained in:
parent
b65daf3784
commit
7c286e1235
@ -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()
|
||||
|
@ -19,10 +19,12 @@
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
|
||||
<p>{{ form.submit }}</p>
|
||||
<p>
|
||||
{{ form.submit }}
|
||||
<a class="button" href="{{ url_for('register') }}">Register</a>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<p><a href="{{ url_for('register') }}">Register Here</a></p>
|
||||
<p><a href="{{ url_for('reset_password_request') }}">Reset Password</a></p>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user