(schedule_id, recipients)
:param schedule_id: the AlertSchedule schedule_id
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
:param schedule_id: the AlertSchedule schedule_id
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
: param schedule_id : the AlertSchedule schedule_id : param recipients : a list of ( recipient_type recipient_id ) tuples ; the recipient type should be one of the values checked in ScheduleInstance . recipient
def refresh_alert_schedule_instances(schedule_id, recipients):
    """
    :param schedule_id: the AlertSchedule schedule_id
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
    """
    with CriticalSection(['refresh-alert-schedule-instances-for-%s' % schedule_id.hex], timeout=5 * 60):
        schedule = AlertSchedule.objects.get(schedule_id=schedule_id)
        AlertScheduleInstanceRefresher(
            schedule,
            recipients,
            get_alert_schedule_instances_for_schedule(schedule)
        ).refresh()
def refresh_alert_schedule_instances ( schedule_id , recipients ) : with CriticalSection ( [ 'refresh-alert-schedule-instances-for-%s' % schedule_id . hex ] , timeout = 5 * 60 ) : schedule = AlertSchedule . objects . get ( schedule_id = schedule_id ) AlertScheduleInstanceRefresher ( schedule , recipients , get_alert_schedule_instances_for_schedule ( schedule ) ) . refresh ( )