feat: initial commit

This commit is contained in:
2026-03-05 22:12:38 +01:00
commit bce762a783
380 changed files with 51955 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
from celery import Celery
from app.config import settings
celery_app = Celery(
"schaefflerautomat",
broker=settings.redis_url,
backend=settings.redis_url,
include=["app.tasks.step_tasks", "app.tasks.ai_tasks", "app.tasks.flamenco_tasks"],
)
celery_app.conf.update(
task_serializer="json",
result_serializer="json",
accept_content=["json"],
timezone="UTC",
enable_utc=True,
task_routes={
"app.tasks.step_tasks.*": {"queue": "step_processing"},
"app.tasks.ai_tasks.*": {"queue": "ai_validation"},
"app.tasks.flamenco_tasks.*": {"queue": "step_processing"},
},
beat_schedule={
"poll-flamenco-jobs": {
"task": "app.tasks.flamenco_tasks.poll_flamenco_jobs",
"schedule": 10.0, # every 10 seconds
# Discard if not consumed before the next run; prevents queue build-up
# when workers are busy with long-running STEP/render tasks.
"options": {"expires": 9},
},
"check-stalled-renders": {
"task": "app.tasks.flamenco_tasks.check_stalled_renders",
"schedule": 300.0, # every 5 minutes
"options": {"expires": 290},
},
},
)