File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package redisdb
3
3
import (
4
4
"context"
5
5
"encoding/json"
6
+ "errors"
7
+ "fmt"
6
8
"strings"
7
9
"sync"
8
10
"sync/atomic"
@@ -110,7 +112,14 @@ func (w *Worker) fetchTask() {
110
112
Block : w .opts .blockTime ,
111
113
}).Result ()
112
114
if err != nil {
113
- w .opts .logger .Errorf ("error while reading from redis %v" , err )
115
+ workerInfo := fmt .Sprintf ("{streamName: %q, group: %q, consumer: %q}" ,
116
+ w .opts .streamName , w .opts .group , w .opts .consumer )
117
+ if errors .Is (err , redis .Nil ) {
118
+ w .opts .logger .Infof ("no data while reading from redis stream %s" , workerInfo )
119
+ } else {
120
+ w .opts .logger .Errorf ("error while reading from redis %s %v" , workerInfo , err )
121
+ }
122
+
114
123
continue
115
124
}
116
125
// we have received the data we should loop it and queue the messages
You can’t perform that action at this time.
0 commit comments