累计约束与控制恢复
原能力
核累计风险和资源约束,故障恢复后先对账再按规定重新开放。(合同附件 R7 16.10)
首选项目
Formance Ledger(MIT)。 Formance Ledger
匹配范围
持久复核和分录累积支持约束对照。
源码
Formance Ledger · func (s *Server) handleGetAccount(
internal/adapter/http/handlers_get_account.go · 12–25 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
func (s *Server) handleGetAccount(w http.ResponseWriter, r *http.Request) {
ledgerName, ok := requireLedgerName(w, r)
if !ok {
return
}
address, ok := requirePathParameter(w, r, "address", "account address")
if !ok {
return
}
// Verify ledger exists
_, err := s.backend.GetLedgerByName(r.Context(), ledgerName)
if err != nil {
Temporal Python SDK · async def wait_condition(
temporalio/workflow/_context.py · 1028–1041 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
async def wait_condition(
fn: Callable[[], bool],
*,
timeout: timedelta | float | None = None,
timeout_summary: str | None = None,
event_groups: Sequence[EventGroup] | None = None,
) -> None:
"""Wait on a callback to become true.
This function returns when the callback returns true (invoked each loop
iteration) or the timeout has been reached.
Importantly, using `None` value for ``timeout`` means that no Temporal timer is created. This
means changing from `None` to a positive value (or the inverse) constitutes a nondeterministic
实现与验收要点
累计额度、原事件纠错、唯一写者与恢复后权源。