Skip to content

Commit

Permalink
fix(kotlin): spring config classes shouldn't use constructors (#4054)
Browse files Browse the repository at this point in the history
  • Loading branch information
asher committed Sep 26, 2019
1 parent 21cc20a commit dc39fb9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ package com.netflix.spinnaker.config
import org.springframework.boot.context.properties.ConfigurationProperties

@ConfigurationProperties("sql.agent")
data class SqlAgentProperties(
var enabledPattern: String = ".*",
var maxConcurrentAgents: Int = 100,
var agentLockAcquisitionIntervalSeconds: Long = 1,
class SqlAgentProperties {
var enabledPattern: String = ".*"
var maxConcurrentAgents: Int = 100
var agentLockAcquisitionIntervalSeconds: Long = 1
var poll: SqlPollProperties = SqlPollProperties()
)
}

data class SqlPollProperties(
var intervalSeconds: Long = 30,
var errorIntervalSeconds: Long = 30,
class SqlPollProperties {
var intervalSeconds: Long = 30
var errorIntervalSeconds: Long = 30
var timeoutSeconds: Long = 300
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties
import java.util.concurrent.TimeUnit

@ConfigurationProperties("sql.agent.task-cleanup")
class SqlTaskCleanupAgentProperties(
var completedTtlMs: Long = TimeUnit.MINUTES.toMillis(60),
class SqlTaskCleanupAgentProperties {
var completedTtlMs: Long = TimeUnit.MINUTES.toMillis(60)
var batchSize: Int = 100
)
}

0 comments on commit dc39fb9

Please sign in to comment.