I have a working version of my web application that I am trying to upgrade at the moment, and I\'m running into the issue of having a task which
Well, first, it's already bad to let users wait for 1 minute until page loads. In general, user-facing HTTP requests should take no more than 1 second. Those 60 seconds that GAE gives -- is already too generous, for critical situations.
I have several suggestions, but I don't know your application to say what you need:
lineups
value before user request it. For that you can utilize GAE Backend instances, which can run way longer than 60 seconds.makeLineups()
will do the trick.makeLineups()
. Once done, the task will take channel_id from Datastore and send there the computed value of lineups
.background_thread.BackgroundThread()
, the rest stays the same. UPDATE This will work better only with backend modules (basic or manual scaling, not automatic). On Frontend (default) modules, custom threads cannot outlive HTTP request, and hence also limited to 60s.Let me know if that helps.