Mercurial > kallithea
diff rhodecode/model/notification.py @ 1722:e7eef7a1db6a beta
#235 forking page repo group selection
- group is selected as parent repo
- refactoring of session behavior to get more atomic operations in models
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 26 Nov 2011 00:11:32 +0200 |
parents | 7ff304d3028f |
children | 64e91067b996 |
line wrap: on
line diff
--- a/rhodecode/model/notification.py Fri Nov 25 20:48:16 2011 +0200 +++ b/rhodecode/model/notification.py Sat Nov 26 00:11:32 2011 +0200 @@ -35,8 +35,6 @@ from rhodecode.lib import helpers as h from rhodecode.model import BaseModel from rhodecode.model.db import Notification, User, UserNotification -from rhodecode.lib.celerylib import run_task -from rhodecode.lib.celerylib.tasks import send_email log = logging.getLogger(__name__) @@ -74,6 +72,7 @@ :param recipients: list of int, str or User objects :param type_: type of notification """ + from rhodecode.lib.celerylib import tasks, run_task if not getattr(recipients, '__iter__', False): raise Exception('recipients must be a list of iterable') @@ -100,7 +99,7 @@ email_body_html = EmailNotificationModel()\ .get_email_tmpl(type_, **{'subject':subject, 'body':h.rst(body)}) - run_task(send_email, rec.email, email_subject, email_body, + run_task(tasks.send_email, rec.email, email_subject, email_body, email_body_html) return notif