fix: [inputreader] remove retry from reader

master v0.1.5
Jean-Louis Huynen 2020-05-27 16:52:19 +02:00
parent 42a8154142
commit e6e4a49f13
No known key found for this signature in database
GPG Key ID: 64799157F4BD6B93
1 changed files with 5 additions and 10 deletions

View File

@ -2,10 +2,8 @@ package inputreader
import (
"bytes"
"io"
"time"
"github.com/gomodule/redigo/redis"
"io"
)
// RedisLPOPReader is a abstraction of LPOP list
@ -17,14 +15,12 @@ type RedisLPOPReader struct {
d int
// D4 Queue storing
q string
// Time in minute before retrying
retryPeriod time.Duration
// Current buffer
buf []byte
}
// NewLPOPReader creates a new RedisLPOPReader
func NewLPOPReader(rc *redis.Conn, db int, queue string, rt int) (*RedisLPOPReader, error) {
func NewLPOPReader(rc *redis.Conn, db int, queue string) (*RedisLPOPReader, error) {
rr := *rc
if _, err := rr.Do("SELECT", db); err != nil {
@ -36,7 +32,6 @@ func NewLPOPReader(rc *redis.Conn, db int, queue string, rt int) (*RedisLPOPRead
r: rc,
d: db,
q: queue,
retryPeriod: time.Duration(rt) * time.Minute,
}
return r, nil