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
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
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)
|
||||
Reference in New Issue
Block a user