def notify_incident(incident): notifications = NotificationHelper.generate_notifications_for_incident( incident) for notification in notifications: notification.save() send_notifications.apply_async((notification.id, ), eta=notification.send_at)
def notify_user_about_incident(incident, user, delay=None, preparedmsg=None): notifications = NotificationHelper.generate_notifications_for_user( incident, user, delay, preparedmsg) for notification in notifications: notification.save() send_notifications.apply_async((notification.id, ), eta=notification.send_at)
def notify_user_about_incident(incident, user): notifications = NotificationHelper.generate_notifications_for_user(incident, user) for notification in notifications: notification.save() send_notifications.apply_async((notification.id,) ,eta=notification.send_at)
def notify_user_about_incident(incident, user, delay=None, preparedmsg = None): notifications = NotificationHelper.generate_notifications_for_user(incident, user, delay, preparedmsg) for notification in notifications: notification.save() send_notifications.apply_async((notification.id,) ,eta=notification.send_at)