Re: [google-appengine] Re: Need help understanding transactions in tasklets

2019-09-24 Thread 'Elliott (Cloud Platform Support)' via Google App Engine
Hello Rob, It seems that you have a technical question regarding code. Google Groups are meant to discuss and share opinions about Google Platform and products. Please post your scenario on Stackoverflow , where you may receive advice from our programming community

Re: [google-appengine] Re: Need help understanding transactions in tasklets

2019-09-08 Thread Rob Curtis
Hi, The problem isn't that the key isn't retrieved; get result *IS succeeding. *If it failed we wouldn't queue the task.The issue is that the _post_put_hook is running outside of the transaction and is queuing up a task before it's actually been committed (so the task that was queued up will

Re: [google-appengine] Re: Need help understanding transactions in tasklets

2019-09-04 Thread 'Diogo Almeida' via Google App Engine
If an exception is detected by Datastore, it would be raised when the code calls get_result() , so the key would not return. However, note that “all post- hooks have a Future argument at the end of the call signature. This

Re: [google-appengine] Re: Need help understanding transactions in tasklets

2019-09-03 Thread Rob Curtis
Thanks Diogo, But that’s why we check get_result for the key. If the get_result failed for the the future, the key wouldn’t be returned would it? On Tue, 03 Sep 2019 at 20:28, 'Diogo Almeida' via Google App Engine < google-appengine@googlegroups.com> wrote: > Note that post hooks do not check wh

[google-appengine] Re: Need help understanding transactions in tasklets

2019-09-03 Thread 'Diogo Almeida' via Google App Engine
Note that post hooks do not check whether the RPC was successful. The hook runs regardless of failure that might have occurred due to issues, more specifically the contention which is when you attempt to write