I have a web app in which there is a feature, for restoring the data from google drive. When a particular user clicks on the restore button an ajax request is sent and a function inside view.py
is executed. During the ongoing process of restoration, the other user who opens up the app will see the maintenance page. But the user which has pressed the restoration button can use the website.
As you might have guessed that, synchronously this cant be possible. When any other user opens the app, the restoration process gets interrupted. The same thing happens when the user who has started the restoration process, decides to use the app (go to another page, click come buttons, etc). So what I want is that when the user presses the restore button the function inside the views.py should execute on a different thread and close that thread when the process finishes. Is there anything pythonanywhere supports in doing so?
Scheduled and always on task cant be used in this because this isn't a recurring task.