Services: - api: FastAPI gateway with JWT auth, async endpoints, WebSocket - worker-gpu: CUDA sentence-transformers, FAISS IVFFlat, Ollama LLM - worker-indexer: Winnowing+MinHash plagiarism detection, PDF/DOCX extraction - worker-notifier: SMTP email notifications - worker-gost: GOST 7.1-2003 and GOST R 7.0.5-2008 formatting Infrastructure: - docker-compose.yml (production) + docker-compose.dev.yml (hot reload) - Nginx reverse proxy + WebSocket support - PostgreSQL 16 with Alembic migrations - Elasticsearch 8 with Russian/English analyzers - MinIO, RabbitMQ, Redis, Ollama Frontend: - React 18 + Vite + TypeScript + TailwindCSS + Zustand + React Query v5 - 9 pages: Home, Search, Cabinet, Task, Check, Bibliography, Pricing, Login, Register Scripts: - Parser stubs: OpenAlex, КиберЛенинка, arXiv (Phase 0 - to be filled) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
712 B
Python
30 lines
712 B
Python
"""Celery приложение notifier-воркера."""
|
|
|
|
from celery import Celery
|
|
|
|
from app.config import settings
|
|
|
|
celery_app = Celery(
|
|
"worker_notifier",
|
|
broker=settings.RABBITMQ_URL,
|
|
backend=settings.REDIS_URL,
|
|
include=["app.tasks.notify"],
|
|
)
|
|
|
|
celery_app.conf.update(
|
|
task_serializer="json",
|
|
result_serializer="json",
|
|
accept_content=["json"],
|
|
timezone="Europe/Moscow",
|
|
enable_utc=True,
|
|
task_track_started=True,
|
|
task_routes={
|
|
"notify.*": {"queue": "queue.notify"},
|
|
"gpu.*": {"queue": "queue.gpu"},
|
|
"index.*": {"queue": "queue.index"},
|
|
"gost.*": {"queue": "queue.gost"},
|
|
},
|
|
task_acks_late=True,
|
|
result_expires=86400,
|
|
)
|