All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.octopusden.octopus.vcsfacade.config.JobConfig.kt Maven / Gradle / Ivy

The newest version!
package org.octopusden.octopus.vcsfacade.config

import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class JobConfig(private val jobProperties: JobProperties) {
    @ConfigurationProperties("vcs-facade.job")
    data class JobProperties(
        val fastWorkTimoutSecs: Int,
        val retryIntervalSecs: Int,
        val executor: ExecutorProperties?
    )

    @Bean
    fun jobExecutor() = (jobProperties.executor ?: ExecutorProperties()).buildThreadPoolTaskExecutor()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy