From 37b080f7f524f799be92d6115ee2c1a25f862ea7 Mon Sep 17 00:00:00 2001 From: Sheikah45 Date: Sat, 23 Sep 2023 07:48:48 -0400 Subject: [PATCH] Increase api read timeout --- .../moderatorclient/api/FafApiCommunicationService.java | 2 ++ src/main/resources/application.yml | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/faforever/moderatorclient/api/FafApiCommunicationService.java b/src/main/java/com/faforever/moderatorclient/api/FafApiCommunicationService.java index 5896a43..2dfd5af 100644 --- a/src/main/java/com/faforever/moderatorclient/api/FafApiCommunicationService.java +++ b/src/main/java/com/faforever/moderatorclient/api/FafApiCommunicationService.java @@ -36,6 +36,7 @@ import java.io.Serializable; import java.lang.reflect.Array; +import java.time.Duration; import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; @@ -99,6 +100,7 @@ public void authorize(HydraAuthorizedEvent event) { meResult = null; restTemplate = restTemplateBuilder.additionalMessageConverters(jsonApiMessageConverter) + .setReadTimeout(Duration.ofMinutes(5)) .errorHandler(jsonApiErrorHandler) .rootUri(environmentProperties.getBaseUrl()) .interceptors(List.of(oAuthTokenInterceptor, diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b95e291..b39bb6f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,11 +1,4 @@ faforever: - api: - base-url: https://api.faforever.com - client-id: 05209670-36c5-40ad-b581-e71b7b49bd1a - client-secret: 370965a5-e7f2-4fe1-9225-e4517476b6a5 - access-token-uri: ${faforever.api.base-url}/oauth/token - max-page-size: 10_000 - max-result-size: 1_000_000 map-generator: repo-and-owner-name: FAForever/Neroxis-Map-Generator query-versions-url: https://api.github.com/repos/${faforever.map-generator.repo-and-owner-name}/releases