From c77820e5182268b42154b3dbbab46569f2e9c527 Mon Sep 17 00:00:00 2001 From: Oguzhan Unlu Date: Thu, 10 Oct 2024 17:09:20 +0300 Subject: [PATCH] [remove] test --- shard_consumer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shard_consumer.go b/shard_consumer.go index c40b3dd..aa447fa 100644 --- a/shard_consumer.go +++ b/shard_consumer.go @@ -62,6 +62,12 @@ func (k *Kinsumer) getRecords(kApi kinesisiface.KinesisAPI, streamName string, s ShardIterator: aws.String(iterator), } + // sleep for 5 minutes + 5 sec, to make sure the shard iterator expires + fmt.Println("Sleeping for 305 seconds") + fmt.Printf("pre-sleep time.Now: %s\n", time.Now().Format(time.RFC3339)) + time.Sleep(305 * time.Second) + fmt.Printf("post-sleep time.Now: %s\n", time.Now().Format(time.RFC3339)) + output, err := kApi.GetRecords(params) if err != nil {