Se agregaron cambios y estats para reportes
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from celery import group
|
||||
|
||||
|
||||
from celery import shared_task, group
|
||||
from api.customs.models import *
|
||||
from api.record.models import *
|
||||
from api.customs.serializers import PedimentoSerializer
|
||||
from api.vucem.models import *
|
||||
import requests
|
||||
@@ -292,4 +291,15 @@ def procesar_partidas(organizacion_id):
|
||||
)
|
||||
# Aquí puedes continuar con el resto de tu lógica
|
||||
|
||||
print(f"Servicio enviado para pedimento {pedimento.pedimento}")
|
||||
print(f"Servicio enviado para pedimento {pedimento.pedimento}")
|
||||
|
||||
@shared_task
|
||||
def documentos_con_errores(organizacion_id):
|
||||
documentos = Document.objects.filter(organizacion_id=organizacion_id)
|
||||
|
||||
for doc in documentos:
|
||||
if doc.document_type is None or doc.size is None or doc.archivo is None:
|
||||
print(f"Documento con error: {doc.id} en organización {organizacion_id}")
|
||||
# Aquí puedes agregar lógica adicional para manejar documentos con errores
|
||||
# como enviar notificaciones, registrar en un log, etc.
|
||||
# documentos = Document.objects.all() --- IGNORE ---
|
||||
|
||||
Reference in New Issue
Block a user