Or you can just ignore the problem, because it's really quite slight. Code defensively - do all the work (that might fail) up front in your task and send the email as a last step. The only problem would be something going wrong in the email send process itself (or the task service wrapup). Could this theoretically result in an extra email to the user? Sure. Will it result in 1,000 emails to the user? It seems pretty unlikely.
Jeff On Wed, Mar 17, 2010 at 5:53 PM, Tim Hoffman <[email protected]> wrote: > Well could yo record if you sent any particular email, and > not resend it ? > > On Mar 18, 6:05 am, prgmratlarge <[email protected]> wrote: >> "When implementing the code for Tasks (as worker URLs within your >> app), it is important that you consider whether the task is >> idempotent. App Engine's Task Queue API is designed to only invoke a >> given task once, however it is possible in exceptional circumstances >> that a Task may execute multiple times (e.g. in the unlikely case of >> major system failure). Thus, your code must ensure that there are no >> harmful side-effects of repeated execution." -http://code.google.com/ >> appengine/docs/python/taskqueue/overview.html >> >> According to this part of the documentation, it would seem that >> setting up an email-sending task-queue is impossible. After all, >> sending someone the same email thousands of times would be disastrous. >> Yet the documentation also gives email sending as an example use of >> the Task Queue. >> >> This seems to be contradictory. How can I create a Task Queue for >> sending email without running into problems of idempotence? >> >> Thanks for your help. > > -- > 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. > > -- 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.
