Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote