优化模块租户检查中间件,重构为函数式实现并添加超级管理员检查;新增MongoDB更新过滤构建工具;修复Redis消息消费错误处理
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user