feat: simplify relationship definitions for FaLineItem in ORM models
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import os
|
||||
from celery import Celery
|
||||
|
||||
# Import models in correct order for SQLAlchemy relationship resolution
|
||||
# CRITICAL: FaLineItem must be imported BEFORE LineItem
|
||||
from api.v1.modules.a24.fa.fa_item_lines.models import FaLineItem # noqa: F401
|
||||
from api.v1.modules.a76.items.models import LineItem # noqa: F401
|
||||
|
||||
valkey_url = os.getenv("VALKEY_URL", "redis://valkey:6379/0")
|
||||
|
||||
@@ -13,8 +17,8 @@ celery_app = Celery(
|
||||
"api.v1.modules.a76.reports.importacion.consolidados.task",
|
||||
"api.v1.modules.a76.reports.importacion.packing_list.task",
|
||||
"api.v1.modules.a76.reports.exportacion.aviso_consolidado.task",
|
||||
"api.v1.modules.a76.reports.exportacion.descargo.task"
|
||||
] # Ruta al módulo donde están las tareas
|
||||
"api.v1.modules.a76.reports.exportacion.descargo.task",
|
||||
], # Ruta al módulo donde están las tareas
|
||||
)
|
||||
|
||||
# Configuraciones adicionales
|
||||
@@ -28,4 +32,4 @@ celery_app.conf.update(
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
celery_app.start()
|
||||
celery_app.start()
|
||||
|
||||
Reference in New Issue
Block a user