mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 22:24:54 +00:00
chore: rename env var UNCLOUD_DEFAULT_HEALTH_MONITOR_PERIOD_MS -> UNCLOUD_HEALTH_MONITOR_PERIOD_MS
This commit is contained in:
1 parent
7b88040c73
commit
e6705599b3
1 file changed
+2
-2
@@ -262,11 +262,11 @@ func (c *ServiceContainer) UnmarshalJSON(data []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DefaultHealthMonitorPeriod is the default duration to wait before checking that the container is still running
|
// DefaultHealthMonitorPeriod is the default duration to wait before checking that the container is still running
|
||||||
// and not restarting. Can be overridden with the UNCLOUD_DEFAULT_HEALTH_MONITOR_PERIOD_MS environment variable.
|
// and not restarting. Can be overridden with the UNCLOUD_HEALTH_MONITOR_PERIOD_MS environment variable.
|
||||||
var DefaultHealthMonitorPeriod = defaultHealthMonitorPeriod()
|
var DefaultHealthMonitorPeriod = defaultHealthMonitorPeriod()
|
||||||
|
|
||||||
func defaultHealthMonitorPeriod() time.Duration {
|
func defaultHealthMonitorPeriod() time.Duration {
|
||||||
if v, ok := os.LookupEnv("UNCLOUD_DEFAULT_HEALTH_MONITOR_PERIOD_MS"); ok {
|
if v, ok := os.LookupEnv("UNCLOUD_HEALTH_MONITOR_PERIOD_MS"); ok {
|
||||||
if ms, err := strconv.Atoi(v); err == nil {
|
if ms, err := strconv.Atoi(v); err == nil {
|
||||||
return time.Duration(ms) * time.Millisecond
|
return time.Duration(ms) * time.Millisecond
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user