Thanks for the catch Jeff. We'll get this fixed after the holiday.

- Jason

On Tue, Dec 22, 2009 at 2:10 PM, jread <[email protected]> wrote:

> Hello,
>
> Just thought I'd share a problem I found in the example datastore
> mapper code here: http://code.google.com/appengine/articles/deferred.html.
> Within the _continue method the line "if (i + 1) % batch_size == 0:"
> is located outside of the for loop. When operating over large sets of
> data, this ensures that the code will reach a DeadlineExceedError
> before it moves on to the check for a multiple of the batch_size. This
> is a problem because it is within this if block that the value of
> start_key is set. So, when the deferred task is created in the
> exception handler, it maintains the value of None for the start_key
> and re-does the operations over the beginning of the dataset and loops
> infinitely. If the size of the data set is small enough that it can
> finish iterating over all entities before the DeadlineExceededError
> occurs, then everything will work.
>
> Moving the if statement into the for loop solves the problem and lets
> the deferred task start from where the current process left off.
>
> Jeff.
>
> --
>
> 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.
>
>
>

--

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.


Reply via email to