This repository implements the second example of flask-celery-example with FastAPI.
Just one-line command docker-compose up -d
to start up the redis, Fastapi server, flower and our worker.
Then just go to http://localhost:8000/ to try our application!
And monitor the execution of celery tasks by flower through http://localhost:5555 !
- Clone this repository.
- Start a local Redis server.
- Start a Celery worker:
- on Linux OS:
celery -A celery_app worker --loglevel=info
- on windows OS:
celery -A celery_app worker --pool=solo --loglevel=info
- on Linux OS:
- Start Celery Flower to monitor.
celery -A main.celery_app flower
- Start the Fastapi web server.
poetry run python main.py