I’ve been working on an app that requires users to upload data to a server, where the data is used to create machine learning models. The process to create a model takes a lot of time (as much as 3 minutes). I don’t want to have an HTTP request open for 3 minutes while the model is being created. I would rather the server accept the request, send back a response immediately, and queue the task for processing. Then the user can poll the server to see if their model is ready. I realized that Celery is the perfect tool for this. In this post I write about how I set up Celery and Flask and share sample code.
The #grid website has a great tool for web designers -it “inserts a layout grid in web pages, allows you to hold it in place, and toggle between displaying it in the foreground or background.” Go to their website and have a look. It’s pretty impressive. Simple, but impressive. I think I’m gonna give this a shot for the next web site I design. I think it would be really useful in development, not as much in a production environment.