From f612a8acb65e5e28c577282ffd2d1875a440e621 Mon Sep 17 00:00:00 2001 From: Dmitry Marchuk Date: Fri, 29 Mar 2024 10:53:39 +0200 Subject: [PATCH] Fix startup #dockerpush --- src/main/kotlin/io/github/smaugfm/monobudget/Main.kt | 3 ++- .../common/retry/JacksonFileStatementRetryRepository.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/github/smaugfm/monobudget/Main.kt b/src/main/kotlin/io/github/smaugfm/monobudget/Main.kt index 4b2e896..4d15d92 100644 --- a/src/main/kotlin/io/github/smaugfm/monobudget/Main.kt +++ b/src/main/kotlin/io/github/smaugfm/monobudget/Main.kt @@ -2,6 +2,7 @@ package io.github.smaugfm.monobudget import io.github.oshai.kotlinlogging.KotlinLogging import io.github.resilience4j.reactor.retry.RetryOperator +import io.github.resilience4j.retry.Retry import io.github.smaugfm.lunchmoney.api.LunchmoneyApi import io.github.smaugfm.lunchmoney.model.LunchmoneyInsertTransaction import io.github.smaugfm.lunchmoney.model.LunchmoneyTransaction @@ -113,7 +114,7 @@ private fun lunchmoneyModule(budgetBackend: Lunchmoney) = single { LunchmoneyApi( budgetBackend.token, - requestTransformer = RetryOperator.of(get()), + requestTransformer = RetryOperator.of(Retry.ofDefaults("default")), ) } } + LunchmoneyModule().module diff --git a/src/main/kotlin/io/github/smaugfm/monobudget/common/retry/JacksonFileStatementRetryRepository.kt b/src/main/kotlin/io/github/smaugfm/monobudget/common/retry/JacksonFileStatementRetryRepository.kt index 431c240..e8d6ca0 100644 --- a/src/main/kotlin/io/github/smaugfm/monobudget/common/retry/JacksonFileStatementRetryRepository.kt +++ b/src/main/kotlin/io/github/smaugfm/monobudget/common/retry/JacksonFileStatementRetryRepository.kt @@ -25,7 +25,7 @@ import kotlin.time.Duration class JacksonFileStatementRetryRepository( private val path: Path, ) : StatementRetryRepository { - internal val objectMapper = + private val objectMapper = jsonMapper { enable(SerializationFeature.INDENT_OUTPUT) addModule(kotlinModule())