We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4132380 commit 61886efCopy full SHA for 61886ef
core/clustersmngr/factory.go
@@ -4,7 +4,6 @@ import (
4
"context"
5
"errors"
6
"fmt"
7
- "os"
8
"sync"
9
"time"
10
@@ -34,25 +33,9 @@ const (
34
33
)
35
36
var (
37
- usersClientsTTL = getEnvDuration("WEAVE_GITOPS_USERS_CLIENTS_TTL", 24*time.Hour)
+ usersClientsTTL = 24 * time.Hour
38
39
40
-func getEnvDuration(key string, defaultDuration time.Duration) time.Duration {
41
- val := os.Getenv(key)
42
- if val == "" {
43
- return defaultDuration
44
- }
45
-
46
- d, err := time.ParseDuration(val)
47
48
- // on error return the default duration
49
- if err != nil {
50
51
52
53
- return d
54
-}
55
56
57
opsUpdateClusters = prometheus.NewCounter(
58
prometheus.CounterOpts{
0 commit comments