How do I run background job in Flask without threading or task-queue

Celery is a fantastic solution to this problem I have used quite successfully in the past to manage millions of jobs per day.

The only real downside is the initial learning curve and complexity of debugging when things go sour (it can happen, especially with millions of jobs).


I would HIGHLY recommend using Celery as you have already mentioned in your post. It is built exactly for this use case. Their docs are really informative and there are no shortage of examples online that can get you up and running quickly.

Additionally, I would say THIS would be an excellent first resource for you to start with.