docker-flask-celery-redis
docker-flask-celery-redis copied to clipboard
worker.py in ./api
What is the use of the worker.py file inside ./api? Since we are already having a separate container running as a celery worker? Is this file obsolete?
It is use to obtain a celery object for tasks, since it imports celery from worker:
celery = Celery('tasks', broker=CELERY_BROKER_URL, backend=CELERY_RESULT_BACKEND)