@@ -34,6 +34,7 @@ import (
34
34
)
35
35
36
36
const importConcurrency = 10
37
+ const retryCount = 5
37
38
38
39
type TsExtractor struct {
39
40
iotcl * iot.Client
@@ -152,7 +153,7 @@ func (a *TsExtractor) populateNumericTSDataIntoS3(
152
153
var batched * iotclient.ArduinoSeriesBatch
153
154
var err error
154
155
var retry bool
155
- for i := 0 ; i < 3 ; i ++ {
156
+ for i := 0 ; i < retryCount ; i ++ {
156
157
batched , retry , err = a .iotcl .GetTimeSeriesByThing (ctx , thingID , from , to , int64 (resolution ))
157
158
if ! retry {
158
159
break
@@ -254,7 +255,7 @@ func (a *TsExtractor) populateStringTSDataIntoS3(
254
255
var batched * iotclient.ArduinoSeriesBatchSampled
255
256
var err error
256
257
var retry bool
257
- for i := 0 ; i < 3 ; i ++ {
258
+ for i := 0 ; i < retryCount ; i ++ {
258
259
batched , retry , err = a .iotcl .GetTimeSeriesStringSampling (ctx , stringProperties , from , to , int32 (resolution ))
259
260
if ! retry {
260
261
break
@@ -314,7 +315,7 @@ func (a *TsExtractor) populateRawTSDataIntoS3(
314
315
var batched * iotclient.ArduinoSeriesRawBatch
315
316
var err error
316
317
var retry bool
317
- for i := 0 ; i < 3 ; i ++ {
318
+ for i := 0 ; i < retryCount ; i ++ {
318
319
batched , retry , err = a .iotcl .GetRawTimeSeriesByThing (ctx , thingID , from , to )
319
320
if ! retry {
320
321
break
0 commit comments