I am real n00b code, so I apologize if this is a simple or basic question.
I code Python, Webapp, Appengine.
My question is, can I continue to work after I wrote out the page? And is this the best way to do something? Basically, when someone creates a list on my website (www.7bks.com), I want to work a bit to do some “post-processing” in the books that they just selected.
I currently have something like this (pseudo code!)
class InputList(webapp.RequestHandler): def post(self):
Now I have a slow (with an API call) post-processing that I want to do for each book in the list. I don’t want to slow down the redirection of the user and the creation of the list page, because my post processing does not directly affect the list page. Can I do it?
class InputList(webapp.RequestHandler): def post(self):
Is this the reason that my application efficiently serves redirection and then continues to work behind the scenes?
Are there any better ways to do this? I know that I can use CRON, but I would like this heavy processed data to be pretty soon after creating the list, but not right away. Feelings like Cron might be the wrong answer (unless I have a CRON script to run every minute or so) and check that new books are processed?)
I know that this is not very asynchronous, but I could not figure out how to express it correctly. I am sure there is such a standard terminology for this kind of thing, but I do not know what it is. Thanks:)
Tom