You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to appengine-...@googlegroups.com
I have an application that makes extensive use of tasklets and I am starting to implement a few _post_put_hooks now. The hooks may call methods that are implemented as tasklets. My question is how to structure the hooks:
1 can i decorate the hooks with @ndb.tasklet and inside the hooks yield for any calls to other tasklets or async rpc's? 2 or similarly use future waits on tasklet calls within the hook but not use the decorator for the hook method? 3 or should I avoid all async calls from the hook methods?
I ask because my requests complete without waiting for async work done in the hook methods (since i'm not calling the hook myself, i don't know how to wait on its future). One way that I've found to solve this is by decorating all my requests with @ndb.toplevel which may be the only solution. since i also use @ndb.synctasklet i would end up with multiple decorators.