Skip to content

Commit

Permalink
Config: reuse existing preTerminationPeriod instead of new shutdownTi…
Browse files Browse the repository at this point in the history
…meout
  • Loading branch information
benjben committed Aug 17, 2023
1 parent 96b0761 commit 85668f6
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 26 deletions.
3 changes: 0 additions & 3 deletions examples/config.kafka.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.kinesis.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.nsq.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.pubsub.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.rabbitmq.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.sqs.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
3 changes: 0 additions & 3 deletions examples/config.stdout.extended.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ collector {
maxCycles = 3
}
}

# When the shutdown gets interrupted, the app continues to serve requests for this duration
shutdownTimeout = 5 minutes
}

# Akka has a variety of possible configuration options defined at
Expand Down
4 changes: 2 additions & 2 deletions http4s/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ collector {

redirectDomains = []

shutdownTimeout = 5 minutes
}
preTerminationPeriod = 10 seconds
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case class Config[+SinkConfig](
ssl: Config.SSL,
enableDefaultRedirect: Boolean,
redirectDomains: Set[String],
shutdownTimeout: FiniteDuration
preTerminationPeriod: FiniteDuration
)

object Config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ object Run {
config.interface,
config.port
)
_ <- withGracefulShutdown(config.shutdownTimeout)(httpServer)
_ <- withGracefulShutdown(config.preTerminationPeriod)(httpServer)
} yield ()

resources.surround(Async[F].never[ExitCode])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ object TestUtils {
),
enableDefaultRedirect = false,
redirectDomains = Set.empty[String],
shutdownTimeout = 5.minutes
preTerminationPeriod = 5.minutes
)
}

0 comments on commit 85668f6

Please sign in to comment.