I try to start a Celery worker server from a command line:
celery -A tasks worker --loglevel=info
The code in tasks.py:
import
My problem was that I put the celery variable inside a main function:
celery
if __name__ == '__main__': # Remove this row app = Flask(__name__) celery = make_celery(app)
when it should be put outside.