diff --git a/obp-api/src/main/resources/props/sample.props.template b/obp-api/src/main/resources/props/sample.props.template index 3560162fe..55ccceeae 100644 --- a/obp-api/src/main/resources/props/sample.props.template +++ b/obp-api/src/main/resources/props/sample.props.template @@ -1208,7 +1208,7 @@ user_account_validated_redirect_url = user_account_is_validated = false # Disable/Enable Metric Scheduler -disable_metrics_scheduler = false +enable_metrics_scheduler = true # Defines the number of days we keep rows in the table "MetricArchive" # default value is 3 years retain_archive_metrics_days = 1095 diff --git a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala index a837f39c0..4fd63c46e 100644 --- a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala @@ -685,12 +685,12 @@ class Boot extends MdcLoggable { case _ => // Do not start it } - APIUtil.getPropsAsBoolValue("disable_metrics_scheduler", false) match { - case false => + APIUtil.getPropsAsBoolValue("enable_metrics_scheduler", true) match { + case true => val interval = APIUtil.getPropsAsIntValue("retain_metrics_scheduler_interval_in_seconds", 3600) MetricsArchiveScheduler.start(intervalInSeconds = interval) - case true => // Do not start it + case false => // Do not start it } object UsernameLockedChecker {