优化模块租户检查中间件,重构为函数式实现并添加超级管理员检查;新增MongoDB更新过滤构建工具;修复Redis消息消费错误处理

This commit is contained in:
2026-01-14 18:34:56 +08:00
committed by 张斌
parent 86cb177625
commit cc940c27b7
4 changed files with 71 additions and 40 deletions

View File

@@ -122,10 +122,10 @@ func readFromStream(ctx context.Context, msg QueueMessage) error {
for {
result, err := getRedisClient().Do(ctx, "XREADGROUP", "GROUP", msg.GroupName, msg.ConsumerName, "COUNT", msg.BatchSize, "BLOCK", 0, "STREAMS", msg.StreamKey, ">")
if err != nil {
select {
case <-ctx.Done():
return
}
//select {
//case <-ctx.Done():
// return
//}
time.Sleep(time.Second)
goto RECONNECT
}