Browse Source

Removed unused code that didn't work

sh4nks 11 years ago
parent
commit
b4a758a442
2 changed files with 0 additions and 17 deletions
  1. 0 11
      flaskbb/decorators.py
  2. 0 6
      flaskbb/email.py

+ 0 - 11
flaskbb/decorators.py

@@ -8,23 +8,12 @@
     :copyright: (c) 2013 by the FlaskBB Team.
     :license: BSD, see LICENSE for more details.
 """
-from threading import Thread
 from functools import wraps
 
 from flask import abort
 from flask.ext.login import current_user
 
 
-def async(f):
-    """
-    A decorator for sending asynchronous mails
-    """
-    def wrapper(*args, **kwargs):
-        thr = Thread(target=f, args=args, kwargs=kwargs)
-        thr.start()
-    return wrapper
-
-
 def admin_required(f):
     @wraps(f)
     def decorated(*args, **kwargs):

+ 0 - 6
flaskbb/email.py

@@ -11,7 +11,6 @@
 from flask import render_template
 from flask.ext.mail import Message
 from flaskbb.extensions import mail
-from flaskbb.decorators import async
 
 
 def send_reset_token(user, token):
@@ -31,11 +30,6 @@ def send_reset_token(user, token):
     )
 
 
-@async
-def send_async_email(msg):
-    mail.send(msg)
-
-
 def send_email(subject, recipients, text_body, html_body, sender=""):
     if not sender:
         msg = Message(subject, recipients=recipients)