def _schedule_task_with_flag(request, domain, action): task_ref = expose_cached_download(payload=None, expiry=1 * 60 * 60, file_extension=None) payload_id = request.POST.get('payload_id') or None repeater_id = request.POST.get('repeater') or None task = task_generate_ids_and_operate_on_payloads.delay( payload_id, repeater_id, domain, action) task_ref.set_task(task)
def _schedule_task_with_flag(request, domain, action): query = _get_query(request) data = None if query: form_query_string = six.moves.urllib.parse.unquote(query) data = _url_parameters_to_dict(form_query_string) task_ref = expose_cached_download(payload=None, expiry=1 * 60 * 60, file_extension=None) task = task_generate_ids_and_operate_on_payloads.delay(data, domain, action) task_ref.set_task(task)
def _schedule_task_with_flag( request: HttpRequest, domain: str, action, # type: Literal['resend', 'cancel', 'requeue'] # 3.8+ use_sql: bool, ): task_ref = expose_cached_download(payload=None, expiry=1 * 60 * 60, file_extension=None) payload_id = request.POST.get('payload_id') or None repeater_id = request.POST.get('repeater') or None task = task_generate_ids_and_operate_on_payloads.delay( payload_id, repeater_id, domain, action, use_sql) task_ref.set_task(task)