Bump sleep time to 10s
Noticed GetRecords error when a Shard's lease expired. * Added a timeout so we don't hit the rate limit on this type of error. * Increased the timeout when there are no Records on the stream.
This commit is contained in:
parent
f921eca908
commit
1b045f6107
1 changed files with 2 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ func (p Pipeline) ProcessShard(ksis *kinesis.Kinesis, shardID string) {
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("GetRecords ERROR: %v\n", err)
|
fmt.Printf("GetRecords ERROR: %v\n", err)
|
||||||
|
time.Sleep(10 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,7 +72,7 @@ func (p Pipeline) ProcessShard(ksis *kinesis.Kinesis, shardID string) {
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("Sleeping: %v\n", shardID)
|
fmt.Printf("Sleeping: %v\n", shardID)
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Buffer.ShouldFlush() {
|
if p.Buffer.ShouldFlush() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue