1. Enqueue a task passing it a list of addressees, and the task
processes the first one, and enqueues a task passing it the rest
2. Enqueue a task passing it the whole list, and the task processes N
addresses, and enqueues a task passing it the rest
3. Enqueue a task passing it the whole list, task enqueues another
task with all items except first N items, and processes the first N
items after that (which I guess would imagine to parallel processing).
How would you do it?
--
Branko Vukelić
bra...@herdhound.com
Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com
Yes I know about this. We will use SendGrid after Beta release, but
for Alpha, we plan to use the GAE mail API simply to keep things
rolling.
> How about querying the datastore and making use of a cursor. Pass the cursor
> value to the new tasks. Will that work for you?
The mailing lists are generated dynamically. So once the list is
compiled from the data in the datastore, I would not like to store it,
and then repeatedly read it from the datastore each time a task is
executed. What I do is:
mailing_list = generate_list(from=some_data)
task.add(url='/url/to/task',
params={'mailing_list': mailing_list.join(',')})
and in the task handler (when I want to do a batch of 50 emails in one task):
mailing_list = params.POST.get('mailing_list').split(',')
to_process = mailing_list[50:]
the_rest = mailing_list[:50]
or in case I want to go one by one:
to_process = mailing_list.pop(0)
the_rest = mailing_list
enqueue the_rest, and process to_process. I haven't tested this yet,
but I'm wondering if it's better to go one-by-one or many-by-many.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.