Browse Source

Rename tasks to celery_tasks

pull/1637/head
Hironsan 2 years ago
parent
commit
a719996ac3
5 changed files with 4 additions and 4 deletions
  1. 0
      backend/api/celery_tasks.py
  2. 2
      backend/api/tests/test_tasks.py
  3. 2
      backend/api/views/export_dataset.py
  4. 2
      backend/api/views/import_dataset.py
  5. 2
      backend/app/celery.py

backend/api/tasks.py → backend/api/celery_tasks.py

2
backend/api/tests/test_tasks.py

@ -2,11 +2,11 @@ import pathlib
from django.test import TestCase from django.test import TestCase
from ..celery_tasks import ingest_data
from ..models import (DOCUMENT_CLASSIFICATION, from ..models import (DOCUMENT_CLASSIFICATION,
INTENT_DETECTION_AND_SLOT_FILLING, SEQ2SEQ, INTENT_DETECTION_AND_SLOT_FILLING, SEQ2SEQ,
SEQUENCE_LABELING, Category, CategoryType, Example, Span, SEQUENCE_LABELING, Category, CategoryType, Example, Span,
SpanType) SpanType)
from ..tasks import ingest_data
from .api.utils import prepare_project from .api.utils import prepare_project

2
backend/api/views/export_dataset.py

@ -8,8 +8,8 @@ from rest_framework.views import APIView
from members.permissions import IsProjectAdmin from members.permissions import IsProjectAdmin
from ..celery_tasks import export_dataset
from ..models import Project from ..models import Project
from ..tasks import export_dataset
from .download.catalog import Options from .download.catalog import Options

2
backend/api/views/import_dataset.py

@ -10,8 +10,8 @@ from rest_framework.views import APIView
from members.permissions import IsProjectAdmin from members.permissions import IsProjectAdmin
from ..celery_tasks import ingest_data
from ..models import Project from ..models import Project
from ..tasks import ingest_data
from .upload.catalog import Options from .upload.catalog import Options

2
backend/app/celery.py

@ -8,4 +8,4 @@ app = Celery('app')
app.config_from_object('django.conf:settings', namespace='CELERY') app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
app.autodiscover_tasks(related_name='celery_tasks')
Loading…
Cancel
Save