Merge pull request #815 from balena-io/change-default-timeout

compose: Change default grace period to 10s
This commit is contained in:
CameronDiver 2018-11-22 13:47:34 +01:00 committed by GitHub
commit 43b8291cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,7 +151,7 @@ export class Service {
delete config.shmSize;
// time strings
let stopGracePeriod = 0;
let stopGracePeriod = 10;
if (config.stopGracePeriod != null) {
stopGracePeriod = new Duration(config.stopGracePeriod).seconds();
}
@ -493,7 +493,7 @@ export class Service {
extraHosts: container.HostConfig.ExtraHosts || [],
ulimits,
stopSignal: (container.Config as any).StopSignal || '',
stopGracePeriod: (container.Config as any).StopTimeout || 0,
stopGracePeriod: (container.Config as any).StopTimeout || 10,
healthcheck: ComposeUtils.dockerHealthcheckToServiceHealthcheck(
(container.Config as any).Healthcheck || {},
),