跳转到正文

business_once API ​

完整接口目录 · 存储与服务用法 · 工具包下载

模块说明 ​

text
Retain the first service request and its atomic child intentions.

This only composes Storage's existing CAS transaction and retained commit
lookup. It owns no scheduler and never resubmits an action or business callback.

once ​

python
async def once(storage, business_key, prepare, *, keys=None)

SDK 说明:

text
Prepare local state/actions once per candidate, commit at most one winner.

prepare(tx) is synchronous and side-effect free outside the transaction;
its JSON result and at least one action are retained together. Concurrent
candidates may prepare independently. A CAS loser only reads the winner.

Neomega · 使用、开发与参考文档