[Django]-Background process in GAE

2đź‘Ť

âś…

Without using a third-party system, I think currently your only option is to use the cron functionality.

You’d still be bound by the usual GAE script-execution-time limitations, but it wouldn’t happen on a page load.

There is plans for background processing, see this App Engine issue #6, and this roadmap update

👤dbr

5đź‘Ť

👤Jason Rikard

2đź‘Ť

I second dbr’s recommendation of http://code.google.com/appengine/docs/python/config/cron.html (and hopes for better future approaches, such as the promised “task queues”).

Nevertheless I suspect that if you do indeed need major (as in CPU heavy) background processing, GAE may not be the most hospitable environment for that. You may want to consider running those heavy background tasks in other environments, and have them communicate with GAE proper e.g. via the “bulk load/download” APIs, see http://code.google.com/appengine/docs/python/tools/uploadingdata.html (and http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_Data_from_App_Engine for the downloading part).

Google’s documentation only describes the usage of the command-line appcfg.py for these purposes (I can’t find a proper documentation of the APIs it uses!), but, if you do need more programmatic usage of these APIs, it’s not hard to evince them from appcfg.py’s sources.

👤Alex Martelli

Leave a comment