mattkohl / docker-flask-celery-redis

Docker-Compose template for orchestrating a Flask app with a Celery queue using Redis
307 stars 131 forks source link

worker.py in ./api #12

Open Hit2theMo opened 3 years ago

Hit2theMo commented 3 years ago

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?

araujofrancisco commented 1 year ago

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)