A possible solution would be to store emails where you have already sent a message to in Memcache. If the tasks get retried, you check for the presence of a key and email hash. If it exists, you don't send the message. If it does not, you send the message and insert into Memcache.
On Tue, Apr 6, 2010 at 3:33 PM, Ubaldo Huerta <[email protected]> wrote: > I have a task that sends a single email which works well, but every > now and then (every 100 emails or so, my guess), the tasks get's > retried because of an exception is thrown while sending the email > message. The problem is that the email message is actually sent even > though the exception below is thrown. So, naturally, I'm lossing face > sending duplicate emails. Is there a way around this before the bug > gets fixed? :-( > > File "/base/python_lib/versions/1/google/appengine/api/mail.py", line > 742, in send > make_sync_call('mail', self._API_CALL, message, response) > File "/base/python_lib/versions/1/google/appengine/api/ > apiproxy_stub_map.py", line 78, in MakeSyncCall > return apiproxy.MakeSyncCall(service, call, request, response) > File "/base/python_lib/versions/1/google/appengine/api/ > apiproxy_stub_map.py", line 278, in MakeSyncCall > rpc.CheckSuccess() > File "/base/python_lib/versions/1/google/appengine/api/ > apiproxy_rpc.py", line 126, in CheckSuccess > raise self.exception > DeadlineExceededError: The API call mail.Send() took too long to > respond and was cancelled. > > -- > 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]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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.
