Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获得saga执行结果? #539

Open
anotherGoogleFan opened this issue Dec 31, 2024 · 0 comments
Open

如何获得saga执行结果? #539

anotherGoogleFan opened this issue Dec 31, 2024 · 0 comments

Comments

@anotherGoogleFan
Copy link

代码所示:

	saga := dtmcli.NewSaga(dtmServer, dtmcli.MustGenGid(dtmServer)).
		Add(logic1Path, logic1RollbackPath, nil).
		Add(logic2Path, logic2RollbackPath, nil)
	saga.WaitResult = true
	if err := saga.Submit(); err != nil {
		slog.Info("fail", slog.Any("err", err))
		return
	}

这里 即使是指定了saga.Waitresult = true
也仍然无法知道 saga 执行是否成功,只能得知saga 是否成功地 Submit 了
我想在这里得知 saga的最终状态 (成功/回滚/重试), 应该如何操作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant