diff --git a/backend/api/tasks.py b/backend/api/celery_tasks.py similarity index 100% rename from backend/api/tasks.py rename to backend/api/celery_tasks.py diff --git a/backend/api/tests/test_tasks.py b/backend/api/tests/test_tasks.py index ba2464fe..864fcbf2 100644 --- a/backend/api/tests/test_tasks.py +++ b/backend/api/tests/test_tasks.py @@ -2,11 +2,11 @@ import pathlib from django.test import TestCase +from ..celery_tasks import ingest_data from ..models import (DOCUMENT_CLASSIFICATION, INTENT_DETECTION_AND_SLOT_FILLING, SEQ2SEQ, SEQUENCE_LABELING, Category, CategoryType, Example, Span, SpanType) -from ..tasks import ingest_data from .api.utils import prepare_project diff --git a/backend/api/views/export_dataset.py b/backend/api/views/export_dataset.py index 06732fcd..e3572ddc 100644 --- a/backend/api/views/export_dataset.py +++ b/backend/api/views/export_dataset.py @@ -8,8 +8,8 @@ from rest_framework.views import APIView from members.permissions import IsProjectAdmin +from ..celery_tasks import export_dataset from ..models import Project -from ..tasks import export_dataset from .download.catalog import Options diff --git a/backend/api/views/import_dataset.py b/backend/api/views/import_dataset.py index e4019ced..2aa441f0 100644 --- a/backend/api/views/import_dataset.py +++ b/backend/api/views/import_dataset.py @@ -10,8 +10,8 @@ from rest_framework.views import APIView from members.permissions import IsProjectAdmin +from ..celery_tasks import ingest_data from ..models import Project -from ..tasks import ingest_data from .upload.catalog import Options diff --git a/backend/app/celery.py b/backend/app/celery.py index b5d0ab0a..716a7a03 100644 --- a/backend/app/celery.py +++ b/backend/app/celery.py @@ -8,4 +8,4 @@ app = Celery('app') app.config_from_object('django.conf:settings', namespace='CELERY') -app.autodiscover_tasks() +app.autodiscover_tasks(related_name='celery_tasks')