Skip to content

Commit 6c771f0

Browse files
committed
HAWNG-1855: Makes the default polling interval more prominent
* Makes the code obvious as to what the default polling interval of the updater is set to.
1 parent b9db89e commit 6c771f0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/manager/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ import (
2929
"github.com/hawtio/hawtio-operator/pkg/util"
3030
)
3131

32+
// DefaultPollingInterval is the default polling interval
33+
// of the updater if no override has been specified with
34+
// the UPDATE_POLLING_INTERVAL environment variable
35+
const DefaultPollingInterval = 12 * time.Hour
36+
3237
// logLevelEnvVar is the constant for env variable OPERATOR_LOG_LEVEL
3338
// which specifies the level of the operator logging.
3439
// An empty value means the operator runs with a level of "Info".
@@ -294,7 +299,7 @@ func getLogLevel() zapcore.Level {
294299
}
295300

296301
func getUpdateInterval() time.Duration {
297-
updatePollingInterval := 12 * time.Hour
302+
updatePollingInterval := DefaultPollingInterval
298303
updatePollingIntervalStr, found := os.LookupEnv(updatePollingIntervalEnvVar)
299304
if found {
300305
if updatePollingIntervalStr == "0" {

0 commit comments

Comments
 (0)