diff --git a/radis/core/management/commands/populate_reports.py b/radis/core/management/commands/populate_reports.py index f31adf22..5c1877dc 100644 --- a/radis/core/management/commands/populate_reports.py +++ b/radis/core/management/commands/populate_reports.py @@ -47,7 +47,7 @@ def create_reports(language: Literal["en", "de"], group: Group): def create_documents() -> None: if settings.OPENSEARCH_ENABLED: start = time.time() - create_opensearch_documents([report.id for report in reports]) + create_opensearch_documents(reports) print(f"Fed {len(reports)} reports to OpenSearch in {time.time() - start:.2f} seconds.") if settings.VESPA_ENABLED: diff --git a/radis/opensearch/tasks.py b/radis/opensearch/tasks.py deleted file mode 100644 index cac424f7..00000000 --- a/radis/opensearch/tasks.py +++ /dev/null @@ -1,22 +0,0 @@ -from celery import shared_task - -from radis.opensearch.utils.document_utils import ( - create_documents, - delete_documents, - update_documents, -) - - -@shared_task(queue="opensearch_queue") -def process_created_reports(report_ids: list[int]) -> None: - create_documents(report_ids) - - -@shared_task(queue="opensearch_queue") -def process_updated_reports(report_ids: list[int]) -> None: - update_documents(report_ids) - - -@shared_task(queue="opensearch_queue") -def process_deleted_reports(document_ids: list[str]) -> None: - delete_documents(document_ids)