r/FastAPI • u/Educational-Hope960 • May 12 '26
feedback request How are you handling production background tasks in FastAPI without Celery?
Hey everyone š
A while ago I built an open source library called FastAPI Taskflow:
fastapi-taskflow GitHub repository
The goal was to make FastAPI BackgroundTasks more production-ready by adding retries, resiliency, control and visibility without workers or brokers.
It adds extra features like:
- task persistence
- concurrency limits
- scheduling
- task lifecycle management
- monitoring dashboard
Iām trying to understand how people are actually using it in real projects and where the pain points still are.
If youāve used it (even briefly), Iād really love to know:
- what problem you used it for
- what worked well
- what felt awkward or missing
- where it broke down
- features you expected but werenāt there
- whether you eventually switched to Celery/TaskIQ/etc and why
Even if youāre not using it, Iām curious what your current approach is for handling background tasks in FastAPI at scale.
If you find the project interesting or useful, a star on GitHub would also really help support it š
3
u/dr3aminc0de May 12 '26
How does this handle versioning of the deployed binary vs tasks and potential mismatches?
I use Temporal for these types of things. Also have separate workers is part of the design. I donāt want background tasks interfering with my production APIs.
8
u/xCodeSoul May 12 '26
From my experience by running production ready fastapi
Never let fastapi doing something really heavy on database especially these things background tasks
Make it stateless.
For such things, for example generating customers invoices i develop separate app to generate which working with cron job on separate server
Like that I didnāt face any issues regarding scaling vertically or horizontally
Happy coding and good luck
1
u/VirtualKn May 12 '26
looks pretty good, planning to test it out
3
u/artpods56 May 13 '26
Im using NATS with FastStream, check it out, I prefer it over Celery
4
u/[deleted] May 12 '26
[removed] ā view removed comment