fix/forzar-procesamiento-acuses
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import time
|
||||
from celery_app import celery_app
|
||||
from celery_app import celery_app
|
||||
from typing import Dict
|
||||
from fastapi import HTTPException as _HTTPException
|
||||
|
||||
from .services import obtener_edoc
|
||||
from .services import obtener_edoc
|
||||
from api.api_v2.modules.tasks.services import register_task, update_task
|
||||
|
||||
# Logger para el módulo
|
||||
@@ -92,7 +93,9 @@ def process_edoc_download_request(self, edoc_data: Dict) -> Dict:
|
||||
)
|
||||
except Exception as update_error:
|
||||
logger.error(f"Error actualizando estado de tarea: {update_error}")
|
||||
|
||||
|
||||
if isinstance(e, _HTTPException):
|
||||
raise RuntimeError(f"HTTP {e.status_code}: {e.detail}") from None
|
||||
raise
|
||||
finally:
|
||||
# Cerrar el loop para liberar recursos
|
||||
|
||||
Reference in New Issue
Block a user