(export_instance_id, manual=False)
Kicks off a celery task to rebuild the export.

    If this is called while another one is already running for the same export
    instance, it will just noop.
Kicks off a celery task to rebuild the export.
Kicks off a celery task to rebuild the export .
def rebuild_saved_export(export_instance_id, manual=False):
    """Kicks off a celery task to rebuild the export.

    If this is called while another one is already running for the same export
    instance, it will just noop.
    """
    download_data = _get_saved_export_download_data(export_instance_id)
    status = get_task_status(download_data.task)
    if manual and status.missing() and download_data.task:
        download_data.task.revoke(terminate=True)
    if status.not_started() or status.started():
        return

    # associate task with the export instance
    download_data.set_task(
        _start_export_task.apply_async(
            args=[export_instance_id],
            queue=EXPORT_DOWNLOAD_QUEUE if manual else SAVED_EXPORTS_QUEUE,
        )
    )
def rebuild_saved_export ( export_instance_id , manual = False ) : download_data = _get_saved_export_download_data ( export_instance_id ) status = get_task_status ( download_data . task ) if manual and status . missing ( ) and download_data . task : download_data . task . revoke ( terminate = True ) if status . not_started ( ) or status . started ( ) : return # associate task with the export instance download_data . set_task ( _start_export_task . apply_async ( args = [ export_instance_id ] , queue = EXPORT_DOWNLOAD_QUEUE if manual else SAVED_EXPORTS_QUEUE , ) )