Move web/task shutdown to container. Shutdown web before tasks. Add shutdown timeouts to config.
This commit is contained in:
parent
4e5c5127e8
commit
732e81f5a4
4 changed files with 37 additions and 40 deletions
|
|
@ -63,12 +63,13 @@ type (
|
|||
|
||||
// HTTPConfig stores HTTP configuration
|
||||
HTTPConfig struct {
|
||||
Hostname string
|
||||
Port uint16
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
IdleTimeout time.Duration
|
||||
TLS struct {
|
||||
Hostname string
|
||||
Port uint16
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
IdleTimeout time.Duration
|
||||
ShutdownTimeout time.Duration
|
||||
TLS struct {
|
||||
Enabled bool
|
||||
Certificate string
|
||||
Key string
|
||||
|
|
@ -109,6 +110,7 @@ type (
|
|||
Goroutines int
|
||||
ReleaseAfter time.Duration
|
||||
CleanupInterval time.Duration
|
||||
ShutdownTimeout time.Duration
|
||||
}
|
||||
|
||||
// MailConfig stores the mail configuration
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ http:
|
|||
readTimeout: "5s"
|
||||
writeTimeout: "10s"
|
||||
idleTimeout: "2m"
|
||||
shutdownTimeout: "10s"
|
||||
tls:
|
||||
enabled: false
|
||||
certificate: ""
|
||||
|
|
@ -35,6 +36,7 @@ tasks:
|
|||
goroutines: 1
|
||||
releaseAfter: "15m"
|
||||
cleanupInterval: "1h"
|
||||
shutdownTimeout: "10s"
|
||||
|
||||
mail:
|
||||
hostname: "localhost"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue