Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming. Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
36 lines
521 B
Go
36 lines
521 B
Go
package server
|
|
|
|
import (
|
|
"math"
|
|
"strconv"
|
|
)
|
|
|
|
func (s *Server) getZombieGraceHours(domainUUID ...string) int64 {
|
|
|
|
raw := s.getDomainConfig("zombie_grace_hours", domainUUID...)
|
|
if raw == "" {
|
|
return 24
|
|
}
|
|
|
|
n, err :=
|
|
strconv.ParseInt(
|
|
raw,
|
|
10,
|
|
64,
|
|
)
|
|
|
|
if err != nil || n < 0 {
|
|
return 24
|
|
}
|
|
|
|
return n
|
|
}
|
|
|
|
func (s *Server) getZombieGraceSeconds(domainUUID ...string) int64 {
|
|
hours := s.getZombieGraceHours(domainUUID...)
|
|
if hours > math.MaxInt64/3600 {
|
|
return math.MaxInt64
|
|
}
|
|
return hours * 3600
|
|
}
|