cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] mdominka commented on a change in pull request #3737: Add missing HA config keys
Date Wed, 04 Dec 2019 10:28:12 GMT
mdominka commented on a change in pull request #3737: Add missing HA config keys
URL: https://github.com/apache/cloudstack/pull/3737#discussion_r353661378
 
 

 ##########
 File path: server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java
 ##########
 @@ -844,17 +848,17 @@ public boolean configure(final String name, final Map<String, Object>
xmlParams)
         value = params.get("force.ha");
         _forceHA = Boolean.parseBoolean(value);
 
-        value = params.get("time.to.sleep");
-        _timeToSleep = (long)NumbersUtil.parseInt(value, 60) * 1000;
+        value = params.get(TimeToSleep.key());
+        _timeToSleep = NumbersUtil.parseLong(value, parseLong(TimeToSleep.defaultValue()))
* 1000;
 
-        value = params.get("max.retries");
-        _maxRetries = NumbersUtil.parseInt(value, 5);
+        value = params.get(MaxRetries.key());
+        _maxRetries = NumbersUtil.parseInt(value, parseInt(MaxRetries.defaultValue()));
 
-        value = params.get("time.between.failures");
-        _timeBetweenFailures = NumbersUtil.parseLong(value, 3600) * 1000;
+        value = params.get(TimeBetweenFailures.key());
+        _timeBetweenFailures = NumbersUtil.parseLong(value, parseLong(TimeBetweenFailures.defaultValue()))
* 1000;
 
 Review comment:
   I also changed this legacy code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message