-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔥 Remove Celery and Flower, they are currently not used nor recommended #694
Conversation
Why are they not recommended ? |
@PierrickLP I was just writing all the descriptions above. 😅 Once I figure out what would be the approach I would recommend, I would update it in this repo. 🤓 |
There's a celery file not deleted |
maybe it's time to build something called |
Maybe check this out: I don’t know if it fits the bill, but it at least is built with async support. It has quite some plugins that make it support all important queues, as well as things like FastAPI integration: |
@tiangolo do you have new insights about Task Queueing and the tooling you will add for that? I am building up ab project witch needs queing and delaying and prioitising of queues with workers. Is there any desiccion with tool you may use in the future? |
If a beautiful UI matters, both Airflow and Prefect are excellent choices. |
@tiangolo Do you have any recommendations yet? :) |
@tiangolo Bump, any news? |
@tiangolo Also very curious if you have any updates 😁 |
…ecommended (fastapi#694)" This reverts commit 1e256bc.
@tiangolo just a heads up, the FastApi documentation still says:
A bit confusing to arrive here and find Celery has been removed and is not recommended. |
I'm also confused about the missing celery. I use Celery for scheduled tasks, after all it is the only independent one can fit well with my fastapi server and deployed as docker within the cluster. So for docker clustering, I feel celery is a good solution at so far. However, the learning slope (difficulty) of celery is suddenly too high, so I have to discard it. BTW, please update the document and remove the paragraphs about celery.... |
In fastapi/full-stack-fastapi-template#694 celery was removed from the template project, it makes no sense anymore mentioning in the docs that is an example on how to use celery. Signed-off-by: David Caro <me@dcaro.es>
FYI, the official docs still mention that Celery is configurated in the project generator: |
🔥 Remove Celery and Flower, they are currently not used nor recommended
When choosing Celery I evaluated RQ, Dramatiq, and a couple of other options, but Celery was the only one at the time that would allow having workers running externally with potentially different dependencies (e.g. TensorFlow models), as there was a way to make Celery not import everything for the client sending a job.
Nevertheless, that is not the default or documented behavior in Celery. And Celery also has many features that I don't use, or would not suggest using, like chains and chords, as they became quite difficult to debug and handle when I used that.
I would prefer something different, but I don't know yet what would be the best alternative. I wanted to try ARQ, as it's from the same author of Pydantic, but that's also a smaller library without any type of dashboard/observability, etc.
I want to try Prefect, Hatchet, and maybe others (Dask, Ray, Dagster?). I still don't know what is the best option.
For things that are not resource-intensive and are expected to be done very fast, a simple integrated
BackgroundTask
from FastAPI would be enough. For heavier problems that require distributed tasks running in the background, I think there might be alternatives better than Celery. I have to investigate the subject more before deciding and implementing anything here.For now, I just don't want to suggest using something that I currently don't endorse, and that is also not really needed in this repo as it is. 😅