Run Flask with Celery.
Read Medium article for more.
You'll maybe want to create a new environment, if you're using conda
you can do the following:
conda create --name fc --no-default-packages python=3.6.7
conda activate fc
pip install -r requirements.txt
First off, make sure to have redis
running on 0.0.0.0:6379
. If you're using docker you may want to:
docker run --name some-redis -d redis
You'll need a worker to get things done, run the following command in a separate terminal tab:
celery worker -A celery_worker.celery --loglevel=info --pool=solo
Open a new terminal tab and start the app:
python run.py
On your browser, go to: http://localhost:5000/flask_celery_howto.txt/it-works!