24 lines
585 B
Python
24 lines
585 B
Python
import os
|
|
from celery import Celery
|
|
|
|
valkey_url = os.getenv("VALKEY_URL", "redis://localhost:6379/0")
|
|
|
|
celery_app = Celery(
|
|
"anexo76_tasks",
|
|
broker=valkey_url,
|
|
backend=valkey_url,
|
|
include=["api.v1.modules.a76.reports.importacion.facturas.task"] # Ruta al módulo donde están las tareas
|
|
)
|
|
|
|
# Configuraciones adicionales
|
|
celery_app.conf.update(
|
|
task_track_started=True,
|
|
task_serializer="json",
|
|
accept_content=["json"],
|
|
result_serializer="json",
|
|
timezone="America/Mexico_City",
|
|
enable_utc=True,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
celery_app.start() |