Esempio n. 1
0
def _schedule_task_without_flag(request, domain, action):
    records = _get_records(request)
    task_ref = expose_cached_download(payload=None,
                                      expiry=1 * 60 * 60,
                                      file_extension=None)
    task = task_operate_on_payloads.delay(records, domain, action)
    task_ref.set_task(task)
Esempio n. 2
0
def _schedule_task_without_flag(
    request: HttpRequest,
    domain: str,
    action,  # type: Literal['resend', 'cancel', 'requeue']  # 3.8+
    use_sql: bool,
):
    record_ids = _get_record_ids_from_request(request)
    task_ref = expose_cached_download(payload=None, expiry=1 * 60 * 60, file_extension=None)
    task = task_operate_on_payloads.delay(record_ids, domain, action, use_sql)
    task_ref.set_task(task)