Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 5m5s
CI/CD Pipeline / Run Tests (push) Failing after 5m5s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 5m5s
CI/CD Pipeline / Run Tests (push) Failing after 5m5s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
19
src/apps/form_6/tasks.py
Normal file
19
src/apps/form_6/tasks.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Celery задачи для формы Ф-6."""
|
||||
|
||||
import logging
|
||||
from io import BytesIO
|
||||
|
||||
from apps.core.tasks import TrackedTask
|
||||
from apps.form_6.services import FormF6Parser
|
||||
from celery import shared_task
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@shared_task(bind=True, base=TrackedTask)
|
||||
def process_form_f6_file(self, file_content: bytes, file_name: str) -> dict:
|
||||
logger.info(f"Начало обработки файла Ф-6: {file_name}")
|
||||
parser = FormF6Parser()
|
||||
result = parser.parse(BytesIO(file_content))
|
||||
logger.info(f"Обработка Ф-6 завершена: {result.loaded_count} загружено, {result.skipped_count} пропущено")
|
||||
return result.to_dict()
|
||||
Reference in New Issue
Block a user