Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTOR-5560 Add shutdown configuration for engine #3405

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

marychatte
Copy link
Member

Subsystem
Server

Motivation
KTOR-5560

@marychatte marychatte self-assigned this Feb 14, 2023
@marychatte marychatte requested a review from e5l February 22, 2023 10:18
@@ -130,6 +130,12 @@ public fun BaseApplicationEngine.Configuration.loadCommonConfiguration(deploymen
deploymentConfig.propertyOrNull("workerGroupSize")?.getString()?.toInt()?.let {
workerGroupSize = it
}
deploymentConfig.propertyOrNull("shutdownGracePeriod")?.getString()?.toLong()?.let {
shutdownGracePeriod = it
} ?: { shutdownGracePeriod = 1000 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we extract default values to a global constant and use the same value everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I deleted the setting of default values here because shutdownGracePeriod and shutdownTimeout already have default values in Configuration

Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please check the comment

@marychatte marychatte merged commit 773cb9c into 2.3.0-eap Feb 24, 2023
@marychatte marychatte deleted the marychatte/KTOR-5560-shutdown-configuration branch February 24, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants