Skip to content

Commit

Permalink
fix: Switch to retryStrategy as retryPolicy is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
akash1810 committed Aug 2, 2024
1 parent e187f09 commit e060263
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions app/conf/AWS.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package conf

import java.net.InetAddress

import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration
import software.amazon.awssdk.core.retry.RetryPolicy
import software.amazon.awssdk.core.retry.RetryMode
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.regions.internal.util.EC2MetadataUtils
import software.amazon.awssdk.services.ec2.Ec2Client
Expand All @@ -13,20 +12,14 @@ import software.amazon.awssdk.services.ec2.model.{
Filter
}
import utils.Logging

import scala.collection.MapView
import scala.jdk.CollectionConverters._
import scala.util.Try

object AWS extends Logging {
val clientConfig: ClientOverrideConfiguration = ClientOverrideConfiguration
.builder()
.retryPolicy(
RetryPolicy
.builder()
.numRetries(10)
.build()
)
.retryStrategy(RetryMode.ADAPTIVE_V2)
.build()

// This is to detect if we are running in AWS or on GC2. The 169.254.169.254
Expand Down

0 comments on commit e060263

Please sign in to comment.