(report_id)
Sends a scheduled report, via celery background task.
Sends a scheduled report, via celery background task.
Sends a scheduled report via celery background task .
def send_delayed_report(report_id):
    """
    Sends a scheduled report, via celery background task.
    """
    domain = ReportNotification.get(report_id).domain
    if (
        settings.SERVER_ENVIRONMENT == 'production'
        and any(re.match(pattern, domain) for pattern in settings.THROTTLE_SCHED_REPORTS_PATTERNS)
    ):
        # This is to prevent a few scheduled reports from clogging up
        # the background queue.
        # https://manage.dimagi.com/default.asp?270029#BugEvent.1457969
        send_report_throttled.delay(report_id)
    else:
        send_report.delay(report_id)
def send_delayed_report ( report_id ) : domain = ReportNotification . get ( report_id ) . domain if ( settings . SERVER_ENVIRONMENT == 'production' and any ( re . match ( pattern , domain ) for pattern in settings . THROTTLE_SCHED_REPORTS_PATTERNS ) ) : # This is to prevent a few scheduled reports from clogging up # the background queue. # https://manage.dimagi.com/default.asp?270029#BugEvent.1457969 send_report_throttled . delay ( report_id ) else : send_report . delay ( report_id )