Skip to content

Commit

Permalink
Rename reqAcceptGraceTimeOut to requestAcceptGraceTimeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
timoreimann authored and ldez committed Sep 26, 2017
1 parent 8f84490 commit dd1a108
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,6 @@ type ForwardingTimeouts struct {
// LifeCycle contains configurations relevant to the lifecycle (such as the
// shutdown phase) of Traefik.
type LifeCycle struct {
ReqAcceptGraceTimeOut flaeg.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure"`
GraceTimeOut flaeg.Duration `description:"Duration to give active requests a chance to finish before Traefik stops"`
RequestAcceptGraceTimeout flaeg.Duration `description:"Duration to keep accepting requests before Traefik initiates the graceful shutdown procedure"`
GraceTimeOut flaeg.Duration `description:"Duration to give active requests a chance to finish before Traefik stops"`
}
2 changes: 1 addition & 1 deletion docs/configuration/commons.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Controls the behavior of Traefik during the shutdown phase.
# Optional
# Default: 0
#
# reqAcceptGraceTimeOut = "10s"
# requestAcceptGraceTimeout = "10s"

# Duration to give active requests a chance to finish before Traefik stops.
# Can be provided in a format supported by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration) or as raw values (digits).
Expand Down
2 changes: 1 addition & 1 deletion integration/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (s *SimpleSuite) TestPrintHelp(c *check.C) {
c.Assert(err, checker.IsNil)
}

func (s *SimpleSuite) TestReqAcceptGraceTimeout(c *check.C) {
func (s *SimpleSuite) TestRequestAcceptGraceTimeout(c *check.C) {
s.createComposeProject(c, "reqacceptgrace")
s.composeProject.Start(c)

Expand Down
2 changes: 1 addition & 1 deletion integration/fixtures/reqacceptgrace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ logLevel = "DEBUG"
address = ":8000"

[lifeCycle]
reqAcceptGraceTimeOut = "10s"
requestAcceptGraceTimeout = "10s"

[file]
[backends]
Expand Down
2 changes: 1 addition & 1 deletion server/server_signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (server *Server) listenSignals() {
}
default:
log.Infof("I have to go... %+v", sig)
reqAcceptGraceTimeOut := time.Duration(server.globalConfiguration.LifeCycle.ReqAcceptGraceTimeOut)
reqAcceptGraceTimeOut := time.Duration(server.globalConfiguration.LifeCycle.RequestAcceptGraceTimeout)
if reqAcceptGraceTimeOut > 0 {
log.Infof("Waiting %s for incoming requests to cease", reqAcceptGraceTimeOut)
time.Sleep(reqAcceptGraceTimeOut)
Expand Down

0 comments on commit dd1a108

Please sign in to comment.