Fix type conversion error

Fix the compile issue of type conversion. int --> float64.
This commit is contained in:
Tao Jiang 2018-11-22 11:43:45 -06:00 committed by Tao Jiang
parent 6a1a7b7da6
commit 03685b2b19

View file

@ -183,7 +183,7 @@ func (sc *ShardConsumer) getRecords(shard *shardStatus) error {
retriedErrors++ retriedErrors++
// exponential backoff // exponential backoff
// https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff
time.Sleep(time.Duration(math.Exp2(retriedErrors)*100) * time.Millisecond) time.Sleep(time.Duration(math.Exp2(float64(retriedErrors))*100) * time.Millisecond)
continue continue
} }
} }