Exemplo n.º 1
0
from AQNEXT.celery import app
from YBLEGACY import qsatype
from YBUTILS import globalValues
from YBUTILS import DbRouter
from YBLEGACY.constantes import *
from YBUTILS.viewREST import fileAttachment
from YBUTILS import notifications


globalValues.registrarmodulos()


@app.task
def prueba(param):
    print(param)


@app.task
def enviomail(aCodProv):
    indice = 0
    while indice < len(aCodProv):
        emailProveedor = dameEmailsProveedorer(aCodProv[indice]["codproveedor"])
        aCodProv[indice]['emailproveedor'] = emailProveedor
        filepath = generarReport(aCodProv[indice])
        enviarReport(aCodProv[indice], filepath)
        indice += 1


@app.task
def dameEmailsProveedorer(codProveedor):
    listaEmails = ""
Exemplo n.º 2
0
    def __init__(self, sync_object_dict={}):
        self.sync_object_dict = sync_object_dict

        globalValues.registrarmodulos()
        self.register_tasks()