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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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"])
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"])
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)