Files
Imago/app/workers/arq_fallback.py
T
bruno caefc1b1a0
CI / Lint & Format (push) Failing after 11s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 7s
CI / Docker Build (push) Has been skipped
Add configuration files and comprehensive project documentation
- Add .env.backup with full application configuration template
- Create RequestIDMiddleware for trace ID injection in logs
- Implement ARQ fallback pool for Redis unavailability
- Add Dead Letter Queue module for failed job handling
- Include project ROADMAP with audit and 27 applied corrections
- Add Grafana monitoring dashboard with 10 panels
2026-06-22 14:50:05 -04:00

25 lines
608 B
Python

"""
Module partagé pour le fallback ARQ — évite les imports circulaires.
Fournit _FallbackArqPool et is_fallback_pool().
"""
import logging
logger = logging.getLogger(__name__)
class _FallbackArqPool:
"""Fallback quand Redis/ARQ n'est pas disponible."""
async def enqueue_job(self, *args, **kwargs):
logger.warning("arq.fallback_enqueue", extra={"args": str(args)})
return None
async def close(self):
pass
def is_fallback_pool(pool) -> bool:
"""Vérifie si un pool ARQ est le fallback (Redis indisponible)."""
return isinstance(pool, _FallbackArqPool)