I'm running a post, and need the request to be replied fast. So I wanted to put a worker running some operations in background and reply the request imidiatly.
The worker is always finite in operations and executes in [0;1] second
How can I do this? Is there any module that suports this in the google app engine api?
In python
Yes. You want to use the Task Queue API. It does exactly what you need.
There is now threading support for python 2.7.
https://developers.google.com/appengine/docs/python/backends/overview#background_threads
If you want a long-running worker thread, it will have to live in a backend, but if you want a thread for the lifetime of the request to asynchronize your operations and boost speed, you can now use real threads (just beware that frontend threads are killed when the http request is over).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With