remove redundant parseDuration
This commit is contained in:
parent
6913733ad5
commit
88c4ebe559
@ -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")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user