From 7114f27b8447df321b740c9c77446fb38598b74d Mon Sep 17 00:00:00 2001 From: Charlotte Date: Thu, 1 Feb 2024 17:18:18 +0000 Subject: [PATCH] send interactives DCR traffic to new interactive-rendering app --- common/app/common/configuration.scala | 1 + common/app/renderers/DotcomRenderingService.scala | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/app/common/configuration.scala b/common/app/common/configuration.scala index 992482c83ea3..6e8551bebc28 100644 --- a/common/app/common/configuration.scala +++ b/common/app/common/configuration.scala @@ -152,6 +152,7 @@ class GuardianConfiguration extends GuLogging { lazy val baseURL = configuration.getMandatoryStringProperty("rendering.baseURL") lazy val articleBaseURL = configuration.getMandatoryStringProperty("article-rendering.baseURL") lazy val faciaBaseURL = configuration.getMandatoryStringProperty("facia-rendering.baseURL") + lazy val interactiveBaseURL = configuration.getMandatoryStringProperty("interactive-rendering.baseURL") lazy val sentryHost = configuration.getMandatoryStringProperty("rendering.sentryHost") lazy val sentryPublicApiKey = configuration.getMandatoryStringProperty("rendering.sentryPublicApiKey") lazy val timeout = 2.seconds diff --git a/common/app/renderers/DotcomRenderingService.scala b/common/app/renderers/DotcomRenderingService.scala index 97f61721716d..2385f3d4cc51 100644 --- a/common/app/renderers/DotcomRenderingService.scala +++ b/common/app/renderers/DotcomRenderingService.scala @@ -308,7 +308,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload // Nb. interactives have a longer timeout because some of them are very // large unfortunately. E.g. // https://www.theguardian.com/education/ng-interactive/2018/may/29/university-guide-2019-league-table-for-computer-science-information. - post(ws, json, Configuration.rendering.baseURL + "/Interactive", page.metadata.cacheTime, 4.seconds) + post(ws, json, Configuration.rendering.interactiveBaseURL + "/Interactive", page.metadata.cacheTime, 4.seconds) } def getAMPInteractive( @@ -320,7 +320,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload val dataModel = DotcomRenderingDataModel.forInteractive(page, blocks, request, pageType) val json = DotcomRenderingDataModel.toJson(dataModel) - post(ws, json, Configuration.rendering.baseURL + "/AMPInteractive", page.metadata.cacheTime) + post(ws, json, Configuration.rendering.interactiveBaseURL + "/AMPInteractive", page.metadata.cacheTime) } def getAppsInteractive( @@ -336,7 +336,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload // Nb. interactives have a longer timeout because some of them are very // large unfortunately. E.g. // https://www.theguardian.com/education/ng-interactive/2018/may/29/university-guide-2019-league-table-for-computer-science-information. - post(ws, json, Configuration.rendering.baseURL + "/AppsInteractive", page.metadata.cacheTime, 4.seconds) + post(ws, json, Configuration.rendering.interactiveBaseURL + "/AppsInteractive", page.metadata.cacheTime, 4.seconds) } def getEmailNewsletters( @@ -347,7 +347,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload val dataModel = DotcomNewslettersPageRenderingDataModel.apply(page, newsletters, request) val json = DotcomNewslettersPageRenderingDataModel.toJson(dataModel) - post(ws, json, Configuration.rendering.baseURL + "/EmailNewsletters", CacheTime.Facia) + post(ws, json, Configuration.rendering.faciaBaseURL + "/EmailNewsletters", CacheTime.Facia) } def getImageContent(