diff --git a/examples/scenario/simple-mysql/application-simple-mysql.yml b/examples/scenario/simple-mysql/application-simple-mysql.yml index 5befe263..ab34a0ca 100644 --- a/examples/scenario/simple-mysql/application-simple-mysql.yml +++ b/examples/scenario/simple-mysql/application-simple-mysql.yml @@ -9,8 +9,6 @@ r2dbc: username: user password: password reconciliation: - trigger-on-start: - - test-dataset datasets: test-dataset: source: diff --git a/src/main/kotlin/recce/server/config/ReconciliationConfiguration.kt b/src/main/kotlin/recce/server/config/ReconciliationConfiguration.kt index 1ab54cf7..5ef5183a 100644 --- a/src/main/kotlin/recce/server/config/ReconciliationConfiguration.kt +++ b/src/main/kotlin/recce/server/config/ReconciliationConfiguration.kt @@ -3,7 +3,6 @@ package recce.server.config import io.micronaut.context.BeanLocator import io.micronaut.context.annotation.ConfigurationInject import io.micronaut.context.annotation.ConfigurationProperties -import io.micronaut.core.bind.annotation.Bindable import javax.annotation.PostConstruct import javax.validation.constraints.NotNull @@ -13,10 +12,7 @@ interface PostConstructable { @ConfigurationProperties("reconciliation") class ReconciliationConfiguration -@ConfigurationInject constructor( - @Bindable(defaultValue = "") val triggerOnStart: List = emptyList(), - val datasets: Map -) : PostConstructable { +@ConfigurationInject constructor(val datasets: Map) : PostConstructable { @PostConstruct override fun populate(locator: BeanLocator) { diff --git a/src/main/kotlin/recce/server/dataset/DatasetRecService.kt b/src/main/kotlin/recce/server/dataset/DatasetRecService.kt index b1b8356c..f5214af7 100644 --- a/src/main/kotlin/recce/server/dataset/DatasetRecService.kt +++ b/src/main/kotlin/recce/server/dataset/DatasetRecService.kt @@ -1,6 +1,5 @@ package recce.server.dataset -import io.micronaut.scheduling.annotation.Scheduled import jakarta.inject.Inject import jakarta.inject.Singleton import mu.KotlinLogging @@ -71,10 +70,5 @@ open class DatasetRecService( fun runIgnoreFailure(datasetIds: List): Flux = Flux.fromIterable(datasetIds) .filter { it.isNotEmpty() } .flatMap { runFor(it) } - .onErrorContinue { err, it -> logger.warn(err) { "Start-up rec run failed for dataset [$it]." } } - - @Scheduled(initialDelay = "0s", fixedDelay = "1d") - open fun scheduledStart() { - runIgnoreFailure(config.triggerOnStart).subscribe() - } + .onErrorContinue { err, it -> logger.warn(err) { "Start-up rec run failed for dataset [$it]." } } // FIXME can hang if all have errors? } diff --git a/src/test/resources/config/application-test-dataset.yml b/src/test/resources/config/application-test-dataset.yml index e9ac1ce3..82f09d4d 100644 --- a/src/test/resources/config/application-test-dataset.yml +++ b/src/test/resources/config/application-test-dataset.yml @@ -1,5 +1,4 @@ reconciliation: - trigger-on-start: [ ] datasets: test-dataset: source: