Skip to content

Commit

Permalink
adjusted GatewayHttpReadinessCheck to work with much smaller timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeckle committed Nov 12, 2024
1 parent d3e142f commit 8e6f897
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class GatewayHttpReadinessCheck implements Supplier<CompletionStage
*/
public static final String READINESS_ASK_MESSAGE_RESPONSE = "ready";

private static final Duration TIMEOUT = Duration.ofSeconds(30);
private static final Duration TIMEOUT = Duration.ofSeconds(2);

private final ActorSelection rootActor;

Expand All @@ -47,6 +47,6 @@ public GatewayHttpReadinessCheck(final ActorSystem system) {
@Override
public CompletionStage<Boolean> get() {
return Patterns.ask(rootActor, READINESS_ASK_MESSAGE, TIMEOUT)
.handle((answer, throwable) -> answer.equals(READINESS_ASK_MESSAGE_RESPONSE));
.handle((answer, throwable) -> READINESS_ASK_MESSAGE_RESPONSE.equals(answer));
}
}

0 comments on commit 8e6f897

Please sign in to comment.