forge/backend/app/workers/celery_app.py
DJP 7a804e896d Initial commit - FORGE AI unified platform
Features:
- Image generation (OpenAI, Gemini, Leonardo, Bria, Stability, Flux)
- Nano Banana iterative editing
- Video generation and upscaling
- Audio TTS, STT, sound effects (ElevenLabs)
- Text prompt studio and alt text
- User authentication with JWT/cookies
- Admin panel with voice management
- Job queue with Celery
- PostgreSQL + Redis backend
- Next.js 15 + FastAPI architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2025-12-09 20:39:00 -05:00

27 lines
656 B
Python

"""Celery Application Configuration"""
from celery import Celery
from app.config import settings
celery_app = Celery(
"forge_ai",
broker=settings.redis_url,
backend=settings.redis_url,
include=[
"app.workers.tasks"
]
)
# Celery configuration
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=3600, # 1 hour max per task
task_soft_time_limit=3300, # Soft limit 55 minutes
worker_prefetch_multiplier=1,
task_acks_late=True,
task_reject_on_worker_lost=True,
)