- Notifications
You must be signed in to change notification settings - Fork110
GregaVrbancic/fastapi-celery
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Minimal example utilizing FastAPI and Celery with RabbitMQ for task queue, Redis for Celery backend and flower for monitoring the Celery tasks.
- Docker
- Run command
docker-compose up
to start up the RabbitMQ, Redis, flower and our application/worker instances. - Navigate to thehttp://localhost:8000/docs and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app athttp://localhost:5555 (username: user, password: test).
- Python >= 3.7
- RabbitMQ instance
- Redis instance
The RabbitMQ, Redis and flower services can be started with
docker-compose -f docker-compose-services.yml up
Execute the following command:poetry install --dev
- Start the FastAPI web application with
poetry run hypercorn app/main:app --reload
. - Start the celery worker with command
poetry run celery worker -A app.worker.celery_worker -l info -Q test-queue -c 1
- Navigate to thehttp://localhost:8000/docs and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app athttp://localhost:5555 (username: user, password: test).
About
Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.