def IncrementAccountsWithTaskExperiment():
def Go():
def AddFreeCredit(creditamount):
@task
def ProcessOnePage(cursor):
accounts, cursor, kontinue = Account.query().fetch_page(
100, start_cursor = cursor
)
for account in accounts:
account.balance += creditamount
ndb.put_multi(accounts)
if kontinue:
ProcessOnePage(cursor)
ProcessOnePage(None)
AddFreeCredit(10)
return "Increment Accounts With Task", Go
incrementaccountswithtask.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录