Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pynot/tasks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
from celery import shared_task
from .utils.util_email import send_email
from .utils.util_email import send_email as send_new_email

@shared_task(bind=True, name='pynot.tasks.send_email')
def send_email(self, not_id):
Expand All @@ -25,11 +25,11 @@ def send_email(self, not_id):
subject = notification_fire.subject
message = notification_fire.message
print("pynot.tasks.send_email (not_id={0}): send_email".format(not_id))
send_email(to_email=notification.recipient,
subject=subject,
template=Config.load().email_template,
context={'message':message},
smtp_config_name='pynot')
send_new_email(to_email=notification.recipient,
subject=subject,
template=Config.load().email_template,
context={'message':message},
smtp_config_name='pynot')
print("pynot.tasks.send_email (not_id={0}): sended".format(not_id))
notification.status='completed'
notification.save()
Expand Down