Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
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:
2026-03-28 18:23:06 +01:00
parent 8ed3e1175c
commit 345b1d0cc8
201 changed files with 15097 additions and 6691 deletions

View File

@@ -1,54 +1 @@
"""
Celery configuration for the project.
This module contains Celery configuration and task registration.
"""
import os
from celery import Celery
# Set the Django settings module for the 'celery' program.
if "DJANGO_SETTINGS_MODULE" not in os.environ:
raise RuntimeError(
"DJANGO_SETTINGS_MODULE is not set. "
"Export it explicitly before starting Celery "
"(e.g., config.settings.production or config.settings.development)."
)
app = Celery("project")
# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix.
app.config_from_object("django.conf:settings", namespace="CELERY")
# Load task modules from all registered Django apps.
app.autodiscover_tasks()
# Configure Celery Beat schedule
app.conf.beat_schedule = {
# Парсинг сертификатов промышленного производства - каждый день в 3:00
"parse-industrial-production-daily": {
"task": "apps.parsers.tasks.parse_industrial_production",
"schedule": 86400.0, # Every 24 hours
},
# Парсинг реестра производителей - каждый день в 4:00
"parse-manufactures-daily": {
"task": "apps.parsers.tasks.parse_manufactures",
"schedule": 86400.0, # Every 24 hours
},
# Сканирование папки FNS - каждые 5 минут
"scan-fns-directory": {
"task": "apps.parsers.tasks.scan_fns_directory",
"schedule": 300.0, # Every 5 minutes
},
}
app.conf.timezone = "Europe/Moscow"
@app.task(bind=True)
def debug_task(self):
print(f"Request: {self.request!r}")
from core.celery import * # noqa: F403