# Celery configuration app.config['CELERY_BROKER_URL'] = 'redis://localhost:6379/0' app.config['CELERY_RESULT_BACKEND'] = 'redis://localhost:6379/0' app.config['CELERY_ACCEPT_CONTENT'] = ['json'] app.config['CELERY_TASK_SERIALIZER'] = 'json' app.config['CELERY_RESULT_SERIALIZER'] = 'json' app.config['CELERY_IGNORE_RESULT'] = False # Initialize Celery celery = Celery(app.name, broker=app.config['CELERY_BROKER_URL']) celery.conf.update(app.config) testOne = Tests.Test1() testTwo = Tests.Test2() testThree = Tests.Test3() testFour = Tests.Test4() testOne.set_next(testTwo).set_next(testThree).set_next(testFour) @celery.task def startDecisionML(patientName): """Background task to do all medical test and store data.""" @celery.task(bind=True) def long_task(self): """Background task that runs a long function with progress reports.""" Tests.client_code(testOne) message = ''