I find it most convenient to make the 'manageable chunk' one single email. It's a map/reduce-type problem. You want to map the "enqueue email task" across every user. The simplest solution is to iterate across the users and enqueue a task for each. You can do it in batches of 100 (actually QueueConstants.maxTasksPerAdd()); I find the Guava Lists.partition() and Lists.transform() methods really handy here.
With a keys-only query you can probably iterate across 100k records in the ~60s before a query times out. If not, you can enqueue the mapping process. You could even use the google-provided MapReduce toolkit. Ultimately you end up with a zillion "email this user" tasks which you can run as parallel as you wish. Jeff On Sun, Jul 8, 2012 at 12:54 AM, Joakim <[email protected]> wrote: > Split the work into manageable chunks and create one TaskQueue task per > chunk. TaskQueue jobs have a request time limit of ten minutes [0], which > may well be enough to send all your emails. > > [0]: https://developers.google.com/appengine/docs/java/backends/overview > > Joakim > > > On Saturday, July 7, 2012 7:19:12 PM UTC+2, Vivek Kumar wrote: >> >> Hello >> >> We have around 10000 registered users with us who are blood donors. We >> want to send them periodic emails like every month to remind them or their >> account status etc. >> Obviously, a single request cannot process so many emails. >> >> So, what is the suggested way to handle this use case without hitting >> request time limits etc on app engine? >> >> our app is in GAE for java >> >> Vik > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/Oah95qLypI8J. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
