Skip to content

Commit

Permalink
Increase pdfgen timeout (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
geir-waagboe authored Oct 24, 2023
1 parent fb588f8 commit bbc2f76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.syfo.application

import io.ktor.client.*
import net.logstash.logback.argument.StructuredArguments
import no.nav.helse.dialogmelding.XMLDialogmelding
import no.nav.helse.eiFellesformat2.XMLEIFellesformat
Expand Down Expand Up @@ -37,7 +38,7 @@ class DialogmeldingProcessor(
) {
val pdfgenClient = PdfgenClient(
url = env.syfopdfgen,
httpClient = httpClient,
httpClient = httpClientPdfgen,
)

val pdlClient = PdlClient(
Expand Down
8 changes: 8 additions & 0 deletions src/main/kotlin/no/nav/syfo/client/HttpClientCommon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ val commonConfig: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit = {
expectSuccess = true
}

val pdfGenConfig: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit = {
this.commonConfig()
install(HttpTimeout) {
requestTimeoutMillis = 120 * 1000
}
}

val retryAllConfig: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit = {
install(ContentNegotiation) {
jackson { configure() }
Expand All @@ -48,3 +55,4 @@ val proxyConfig: HttpClientConfig<ApacheEngineConfig>.() -> Unit = {
val httpClient = HttpClient(Apache, commonConfig)
val httpClientRetryAll = HttpClient(Apache, retryAllConfig)
val httpClientWithProxy = HttpClient(Apache, proxyConfig)
val httpClientPdfgen = HttpClient(Apache, pdfGenConfig)

0 comments on commit bbc2f76

Please sign in to comment.