I need to display some analytics to the user; however, occasionally these analytics can take a while to crunch (sometimes 2-5 seconds). Instead of waiting on these results, I think I would like to have them updated in a dynamic way on the webpage.
I already have celery implemented in a limited way, but what I would like to do is send some tasks to celery, have the screen render, and once the function is complete, send the return value to the webpage to by udpated.
Once the task is created, should I monitor its status, or once its complete can I just send the json to the webpage directly? some code examples would be helpful.
Thank you.