Exemple #1
0
def echo():
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.echo',
                            [app.config['client'], app.config["ENV"]],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #2
0
def pca_projection():
    logging.info('Computing projections')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.pca', [request.data, app.config['client']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #3
0
def ld_report():
    client_name = app.config['client']['name']
    celery_client.send_task(
        'tasks.report_ld',
        [request.data, app.config['client'], app.config['ENV']],
        serializer='pickle',
        queue=client_name)
    return networking.create_response(200)
Exemple #4
0
def after_delayed():
    logging.info('called after_delayed celery entry point')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.dependent',
                            None,
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #5
0
def init():
    logging.info('Got command to initialize')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.init_store',
                            [app.config['client'], app.config["ENV"]],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #6
0
def compute_cost():
    logging.info('Performing line search')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.lineSearch',
                            [request.data, app.config['client']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #7
0
def compute_likelihoods():
    logging.info('Regression update')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.loglikelihood',
                            [request.data, app.config['client']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #8
0
def lr_init():
    logging.info('Initializing Regression')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.regression_init',
                            [app.config['client'], app.config['ENV']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #9
0
def communicate_cov():
    logging.info('Preparing to report covariances')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.report_cov',
                            [app.config['client'], app.config['ENV']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #10
0
def store_filtered():
    logging.info('Got results of filtered positions')
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.store_filtered',
                            [request.data, app.config['client']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)
Exemple #11
0
def qc():
    logging.info('Got command for QC')
    client_name = app.config['client']['name']
    celery_client.send_task(
        'tasks.init_qc',
        [request.data, app.config['client'], app.config['ENV']],
        serializer='pickle',
        queue=client_name)
    return networking.create_response(200)
Exemple #12
0
def delayed():
    logging.info('called delayed celery entry point')
    client_name = app.config['client']['name']
    # promise = celery_client.send_task('tasks.caller', [adder_fn, 1, 2],
    celery_client.send_task('tasks.caller', [adder_fn, 1, 2],
                            serializer='pickle',
                            queue=client_name)
    # resolution = promise.wait()  # answer is in here, if the celery backend is defined.  This will block.
    return networking.create_response(200)
Exemple #13
0
def data_adjust():
    logging.info('Covariate update')
    client_name = app.config['client']['name']
    celery_client.send_task(
        'tasks.adjust',
        [request.data, app.config['client'], app.config["ENV"]],
        serializer='pickle',
        queue=client_name)
    return networking.create_response(200)
Exemple #14
0
def store_counts(task, client, env, *args, **kw):
    logging.info('Got command to store initialized stats')
    celery_client.send_task('tasks.init_stats', [args[0], client, env],
                            serializer='pickle',
                            queue=client["name"])
Exemple #15
0
def init(task, client, env, *args, **kw):
    logging.info('Got command to initialize')
    celery_client.send_task('tasks.init_store', [client, env],
                            serializer='pickle',
                            queue=client["name"])
Exemple #16
0
def lr_association():
    client_name = app.config['client']['name']
    celery_client.send_task('tasks.asso', [request.data, app.config['client']],
                            serializer='pickle',
                            queue=client_name)
    return networking.create_response(200)