Initialize git, add Apache-2.0 LICENSE, .gitattributes (LF line endings), AGENTS.md (entry points, stack, discovery order, baseline checks), RUNBOOK.md (dev boot, prod deploy with overlay, ingestion, failures, rollback, scaling notes), .env.prod.example with rotated credential placeholders, and dev-only warnings on .env.example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
664 B
Python
29 lines
664 B
Python
"""Celery application instance."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from celery import Celery
|
|
|
|
from app.config import settings
|
|
from app.logging_config import configure_logging
|
|
|
|
configure_logging()
|
|
|
|
celery_app = Celery(
|
|
"legacyhub",
|
|
broker=settings.redis_url,
|
|
backend=settings.redis_url,
|
|
include=["app.workers.tasks"],
|
|
)
|
|
|
|
celery_app.conf.update(
|
|
task_acks_late=True,
|
|
task_reject_on_worker_lost=True,
|
|
task_track_started=True,
|
|
worker_prefetch_multiplier=1,
|
|
task_time_limit=settings.max_document_timeout_seconds * 4,
|
|
task_soft_time_limit=settings.max_document_timeout_seconds * 3,
|
|
timezone="UTC",
|
|
enable_utc=True,
|
|
)
|