On Thursday, April 18, 2013 1:27:00 AM UTC-5, Nijin Narayanan wrote:
>
> The Page is redirecting after the datastore operation performed. Something 
> like this:
>
> db.delete(key)
>
> self.redirect(new_page)
>
> Does this will redirect the page before completing the delete operation ?
>
>
The answer is a resounding and firm "Maybe". 

Operations on the datastore take place in two parts: the commit phase, and 
the apply phase. You can read more about it at 
https://developers.google.com/appengine/docs/python/datastore/overview#Datastore_Writes_and_Data_Visibility
 but 
the short version is that datastore operations return after the commit 
phase, not after the apply phase. You may have told the datastore to delete 
an object, but it'll take some milliseconds for that operation to execute 
even after the delete op has returned. 

You might need to add an artificial delay to your code, or manually account 
for its' deletion.


-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to