Reputation: 1645
deferred.defer(f,e)
function f(e):
e.put_async()
Changes to e
are discarded in the SDK and presumably on production too. One obvious way to solve the problem is to store all rpc's and get_result() them, but this is not pretty.
Is there a way to make this function ndb-compatible?
This function is used in multiple parts of the code, normal requests are @ndb.toplevel
, so there is no problem for them.
Upvotes: 1
Views: 327
Reputation: 10360
The function that you defer can't be an @ndb.toplevel
, but you can have that call a function that is:
def f(e):
g(e)
@ndb.toplevel
def g(e):
e.put_async()
Upvotes: 2