Replace AddEventListener with AddEventListenerCtx and Publish with PublishCtx (#42284)

This commit is contained in:
idafurjes
2021-11-29 14:23:24 +01:00
committed by GitHub
parent 8927a3ca20
commit a65e0be110
6 changed files with 17 additions and 62 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func inTransactionWithRetryCtx(ctx context.Context, engine *xorm.Engine, callbac
if len(sess.events) > 0 {
for _, e := range sess.events {
if err = bus.Publish(e); err != nil {
if err = bus.PublishCtx(ctx, e); err != nil {
tsclogger.Error("Failed to publish event after commit.", "error", err)
}
}