Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-31 11:32:51 +08:00
parent bb4d95ffa0
commit 156a28f27d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 49 additions and 14 deletions

View file

@ -98,6 +98,16 @@ func pushTransactions(app, session string, transactions []*model.Transaction) {
evt.AppId = app
evt.SessionId = session
evt.Data = transactions
var rootIDs []string
for _, tx := range transactions {
rootIDs = append(rootIDs, tx.GetChangedRootIDs()...)
}
rootIDs = gulu.Str.RemoveDuplicatedElem(rootIDs)
evt.Context = map[string]any{
"rootIDs": rootIDs,
}
for _, tx := range transactions {
tx.WaitForCommit()
}