Skip to content

Commit

Permalink
fixed test_batch_notifications()
Browse files Browse the repository at this point in the history
  • Loading branch information
swarbhanu committed Dec 6, 2012
1 parent 56db8f7 commit af7c75d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -1397,7 +1397,7 @@ def cleanup_timer(scheduler, schedule_id):
ar_1 = gevent.event.AsyncResult()
ar_2 = gevent.event.AsyncResult()

def send_email(events_for_message, user_id):
def send_email(events_for_message, user_id, *args, **kwargs):
log.warning("(in asyncresult) events_for_message: %s" % events_for_message)
ar_1.set(events_for_message)
ar_2.set(user_id)
Expand Down
6 changes: 4 additions & 2 deletions ion/services/dm/presentation/user_notification_service.py
Expand Up @@ -705,7 +705,9 @@ def process_batch(self, start_time = 0, end_time = 0):

# send a notification email to each user using a _send_email() method
if events_for_message:
self.format_and_send_email(events_for_message, user_id, self.smtp_client)
self.format_and_send_email(events_for_message = events_for_message,
user_id = user_id,
smtp_client=self.smtp_client)

self.smtp_client.quit()

Expand Down Expand Up @@ -756,7 +758,7 @@ def format_and_send_email(self, events_for_message = None, user_id = None, smtp_
smtp_client=smtp_client )


def send_batch_email(self, msg_body, msg_subject, msg_recipient, smtp_client):
def send_batch_email(self, msg_body = None, msg_subject = None, msg_recipient = None, smtp_client = None):
"""
Send the email
Expand Down

0 comments on commit af7c75d

Please sign in to comment.