MXS-2537 Turn 'cluster_monitor_interval' into duration
This commit is contained in:
@ -208,6 +208,8 @@ ClustrixMonitor* ClustrixMonitor::create(const string& name, const string& modul
|
||||
return pThis;
|
||||
}
|
||||
|
||||
using std::chrono::milliseconds;
|
||||
|
||||
bool ClustrixMonitor::configure(const MXS_CONFIG_PARAMETER* pParams)
|
||||
{
|
||||
if (!MonitorWorker::configure(pParams))
|
||||
@ -220,7 +222,8 @@ bool ClustrixMonitor::configure(const MXS_CONFIG_PARAMETER* pParams)
|
||||
m_health_urls.clear();
|
||||
m_nodes_by_id.clear();
|
||||
|
||||
m_config.set_cluster_monitor_interval(pParams->get_integer(CLUSTER_MONITOR_INTERVAL_NAME));
|
||||
long interval = pParams->get_duration<milliseconds>(CLUSTER_MONITOR_INTERVAL_NAME).count();
|
||||
m_config.set_cluster_monitor_interval(interval);
|
||||
m_config.set_health_check_threshold(pParams->get_integer(HEALTH_CHECK_THRESHOLD_NAME));
|
||||
m_config.set_dynamic_node_detection(pParams->get_bool(DYNAMIC_NODE_DETECTION_NAME));
|
||||
m_config.set_health_check_port(pParams->get_integer(HEALTH_CHECK_PORT_NAME));
|
||||
|
Reference in New Issue
Block a user