mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
chore: rename env var UNCLOUD_DEFAULT_HEALTH_MONITOR_PERIOD_MS -> UNCLOUD_HEALTH_MONITOR_PERIOD_MS
This commit is contained in:
@@ -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