Initial commit: BtToxin Pipeline project structure

This commit is contained in:
2025-10-13 19:22:56 +08:00
commit c7744836e9
37 changed files with 1146 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
"""Celery 配置"""
from celery import Celery
from ..config import settings
celery_app = Celery(
"bttoxin_worker",
broker=settings.CELERY_BROKER_URL,
backend=settings.CELERY_RESULT_BACKEND,
include=['app.workers.tasks']
)
celery_app.conf.update(
task_serializer='json',
accept_content=['json'],
result_serializer='json',
timezone='UTC',
enable_utc=True,
task_track_started=True,
task_time_limit=7200,
worker_prefetch_multiplier=1,
)