How to bring a background task to foreground in google app engine?

You can't "bring a task to the foreground" -- it is a webserver. The server responds to requests from the client.

You can't "bring a task to the foreground" -- it is a webserver. The server responds to requests from the client. But, you have a couple choices to accomplish something similar: Use the Channel API to send the client notice that the work is finished, or a even the results of the processing.

Write status info to memcache or the datastore and poll from the client to determine when the work is finished.

Option #2 is probably the most straightforward way to do this. – Will McCutchen Dec 7 '10 at 18:00.

This won't work directly as you describe it. Once a background task is started, it's a background task for its entire existence. If you want to return some information from the background task to the user, you'll have to add it to the datastore, and have a foreground handler check the datastore for that information.

You may also be able to use the Channel API to have a background task send messages directly to the browser, but I'm not sure if this will work or not (I haven't tried it). If you give a little more information about exactly what you're trying to accomplish I can try to give more details about how to get it done.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions