With normal form submission I use the pattern Post / Redirect / Get, when proces
ID: 651911 • Letter: W
Question
With normal form submission I use the pattern Post / Redirect / Get, when processing the forms.
I have a database application built with Django. I want to allow the users to select a number of items from the database, then launch a computationally intensive task based on those items.
I expect the task to take between 10 minutes and 2 hours to complete.
Is there a standard approach to dealing with requests like this (i.e. that don't return immediately)? Ideally there would be some way to display the progress.
Explanation / Answer
I would trigger a job (e.g. a worker-thread) for this which is able to report the progress and finish the current request. And for displaying the process, i would poll the progress of this job via ajax or similar.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.