fix: add case for setting lastCheckTime in first iteration callGetRecordsAPI
Signed-off-by: Shiva Pentakota <spentakota@vmware.com>
This commit is contained in:
parent
ae3763e478
commit
706e803d27
1 changed files with 3 additions and 0 deletions
|
|
@ -285,6 +285,9 @@ func (sc *PollingShardConsumer) callGetRecordsAPI(gri *kinesis.GetRecordsInput)
|
|||
for _, record := range getResp.Records {
|
||||
sc.bytesRead += float64(len(record.Data))
|
||||
}
|
||||
if sc.lastCheckTime.IsZero() {
|
||||
sc.lastCheckTime = rateLimitTimeNow()
|
||||
}
|
||||
|
||||
return getResp, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue