Allow usage check to be configurable (#6006)

This commit is contained in:
Harshavardhana
2018-06-04 18:35:41 -07:00
committed by kannappanr
parent df1b33013f
commit 6fb0604502
12 changed files with 332 additions and 55 deletions
+9
View File
@@ -153,6 +153,15 @@ func handleCommonEnvVars() {
globalCacheExpiry = expiry
}
if intervalStr := os.Getenv("MINIO_USAGE_CHECK_INTERVAL"); intervalStr != "" {
interval, err := parseDuration(intervalStr)
if err != nil {
logger.Fatal(uiErrInvalidUsageCheckIntervalValue(err), "Invalid MINIO_USAGE_CHECK_INTERVAL value (`%s`)", intervalStr)
}
globalUsageCheckInterval = interval
globalIsEnvUsageCheck = true
}
// In place update is true by default if the MINIO_UPDATE is not set
// or is not set to 'off', if MINIO_UPDATE is set to 'off' then
// in-place update is off.