Google app engine GAE、云SQL和在事务中运行
我将GAE与云SQL一起使用 我似乎看不到文档中提到的这一点,所以我想我会要求澄清我的理解 是对交易进行分组的标准方法,即:Google app engine GAE、云SQL和在事务中运行,google-app-engine,transactions,task-queue,google-cloud-sql,Google App Engine,Transactions,Task Queue,Google Cloud Sql,我将GAE与云SQL一起使用 我似乎看不到文档中提到的这一点,所以我想我会要求澄清我的理解 是对交易进行分组的标准方法,即: def do_something_in_transaction(...) update my CloudSQL database record taskqueue.add(url='/path/to/my/worker', transactional=True) ... db.run_in_transaction(do_something_in_transa
def do_something_in_transaction(...)
update my CloudSQL database record
taskqueue.add(url='/path/to/my/worker', transactional=True)
...
db.run_in_transaction(do_something_in_transaction, ....)
假设对云SQL有效
我还可以在run_in_事务调用期间更新/插入/删除多条记录(即,我需要多少记录)
i、 e:
提前感谢,,
Matt鉴于它是db组件的一部分,我认为run_in_事务是特定于数据存储的
对于CloudSQL,使用SQL事务命令启动事务、提交、回滚。Yeah true。谢谢希望我也能得到GAE团队的回应。
def do_something_in_transaction(...)
x_id = insert record into table x
update table y record with x_id
insert record into table a
insert record into table b
… etc
taskqueue.add(url='/path/to/my/worker', transactional=True)