Se agregaron los moduloes de api_v2

This commit is contained in:
2025-10-03 23:16:47 -06:00
parent ac075bfeb7
commit 7149515606
60 changed files with 3714 additions and 252 deletions

View File

@@ -0,0 +1,19 @@
from celery import Celery
from celery_app import celery_app
import asyncio
import logging
from typing import Dict, Any
from contextlib import asynccontextmanager
def run_async_task(async_func, *args, **kwargs):
"""Helper function to run async functions in Celery tasks"""
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
return loop.run_until_complete(async_func(*args, **kwargs))
finally:
loop.close()