Use separate queue method for notifications
This commit is contained in:
@@ -30,6 +30,9 @@ class ATSTQueue(RQ):
|
||||
def send_mail(self, recipients, subject, body):
|
||||
self._queue_job(ATSTQueue._send_mail, recipients, subject, body)
|
||||
|
||||
def send_notification_mail(self, recipients, subject, body):
|
||||
self._queue_job(ATSTQueue._send_mail, recipients, subject, body)
|
||||
|
||||
# pylint: disable=pointless-string-statement
|
||||
"""Class methods to actually perform the work.
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class NotificationSender(object):
|
||||
recipients, body
|
||||
)
|
||||
)
|
||||
self.queue.send_mail(recipients, self.EMAIL_SUBJECT, body)
|
||||
self.queue.send_notification_mail(recipients, self.EMAIL_SUBJECT, body)
|
||||
|
||||
def _get_recipients(self, type_):
|
||||
query = select([NotificationRecipient.email])
|
||||
|
Reference in New Issue
Block a user