first commit - MVE Incrementables Parser microservice with FastAPI, JWT, Celery, Redis

This commit is contained in:
Ernesto Herrera
2026-03-02 21:31:50 -07:00
commit 068d859f42
27 changed files with 2337 additions and 0 deletions

25
app/core/celery_app.py Normal file
View File

@@ -0,0 +1,25 @@
"""Celery application configuration."""
from celery import Celery
from .config import get_settings
settings = get_settings()
celery_app = Celery(
"mve_incrementables_parser",
broker=settings.celery_broker_url,
backend=settings.celery_result_backend,
include=["app.tasks.parse_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=300, # 5 minutes max
task_soft_time_limit=240, # 4 minutes soft limit
result_expires=3600, # Results expire after 1 hour
)