refactor: 协程启动优化、tagviews调整

This commit is contained in:
meilin.huang
2026-01-20 19:45:46 +08:00
parent 0472c5101f
commit f0de65b7ce
35 changed files with 239 additions and 254 deletions

View File

@@ -195,9 +195,9 @@ func (m *msgTmplAppImpl) SendMsg(ctx context.Context, mts *dto.MsgTmplSend) erro
logx.Warnf("channel is disabled => %s", channel.Code)
continue
}
go func(ch entity.MsgChannel) {
defer gox.RecoverPanic()
gox.Go(func() {
ch := *channel
if err := msgx.Send(ctx, &msgx.Channel{
Type: ch.Type,
Name: ch.Name,
@@ -206,7 +206,7 @@ func (m *msgTmplAppImpl) SendMsg(ctx context.Context, mts *dto.MsgTmplSend) erro
}, msg); err != nil {
logx.Errorf("send msg error => channel=%s, msg=%s, err -> %v", ch.Code, msg.Content, err)
}
}(*channel)
})
}
return nil