diff --git a/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala b/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala index 3e31f2c8fd..9bd83042bf 100644 --- a/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala +++ b/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala @@ -31,15 +31,22 @@ class ServerWarmupHandler @Inject() (warmup: ThriftWarmup) extends Handler { } override def handle(): Unit = { - warmup.sendRequest( - GetIntersection, - Request( - GetIntersection.Args( - getRandomRequest - )), - 10 - )() - - logger.info("Warmup Done!") + if (testingAccounts.isEmpty) { + logger.warn( + "Skipping graph-feature-service warmup because no testing accounts are configured." + ) + return } + + warmup.sendRequest( + GetIntersection, + Request( + GetIntersection.Args( + getRandomRequest + )), + 10 + )() + + logger.info("Warmup Done!") +} }