mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-08 16:34:29 -04:00
History sync: use indefinitely blocking XREAD
Just like we do it throughout the rest of the code.
This commit is contained in:
parent
bfcc324535
commit
8b4e4d68a6
1 changed files with 1 additions and 2 deletions
|
|
@ -103,14 +103,13 @@ func (s Sync) readFromRedis(ctx context.Context, key string, output chan<- redis
|
|||
xra := &redis.XReadArgs{
|
||||
Streams: []string{"icinga:history:stream:" + key, "0-0"},
|
||||
Count: int64(s.redis.Options.XReadCount),
|
||||
Block: 10 * time.Second,
|
||||
}
|
||||
|
||||
for {
|
||||
cmd := s.redis.XRead(ctx, xra)
|
||||
streams, err := cmd.Result()
|
||||
|
||||
if err != nil && err != redis.Nil {
|
||||
if err != nil {
|
||||
return icingaredis.WrapCmdErr(cmd)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue