remove redundant parseDuration

This commit is contained in:
Egor Aristov 2025-01-21 20:29:59 +03:00
parent e3ad088dbd
commit 445a9aa0a8
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

@ -97,9 +97,9 @@ func main() {
SelectorEnclosure: specs.SelectorEnclosure, SelectorEnclosure: specs.SelectorEnclosure,
} }
taskTimeout, _ := time.ParseDuration("20s") taskTimeout := 20 * time.Second
minLifetime := taskTimeout minLifetime := taskTimeout
maxLifetime, _ := time.ParseDuration("24h") maxLifetime := 24 * time.Hour
cacheLifetime, err := time.ParseDuration(specs.CacheLifetime) cacheLifetime, err := time.ParseDuration(specs.CacheLifetime)
if err != nil { if err != nil {
return echo.NewHTTPError(400, "invalid cache lifetime") return echo.NewHTTPError(400, "invalid cache lifetime")