0

HY!

I have a list in GAE, around 300 entries and I would like to send an email to everyone. I've already prepared a script that get all enterprises and then makes a loop for each one and in each iteration it sends an email. Now im concerned with timeout. If I do all the thing in one step, it might take too much time and then i dont know to who i sent or not.

My script is like this:

from models.Enterprise import Enterprise from google.appengine.api import mail esq = Enterprise.all() es = esq.fetch(1000) # normally around 300 for e in es: mail.send_mail(sender="myemail", to=str(e.email), subject="...") 

1 Answer 1

1

I suggest you to delegate this task to a taskqueue that provides a fairly high timeout set to 10 minutes.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, I will check it out. I still don't know how to use it, but I will read some docs (: (maybe you can give me a quick tip?xD)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.