@ -123,7 +123,6 @@ impl AnalyticService {
self.detection_runner = Some(dr);
// dr.run();
// TODO: create DetectionRunnerConfig from alerting
// TODO: rerun detection runner on analytic unit change
// if self.runner_handler.is_some() {
@ -159,6 +159,9 @@ impl AnalyticUnit for AnomalyAnalyticUnit {
fn set_config(&mut self, config: AnalyticUnitConfig) {
if let AnalyticUnitConfig::Anomaly(cfg) = config {
self.config = cfg;
if self.sarima.is_some() {
self.sarima.as_mut().unwrap().confidence = self.config.confidence;
}
} else {
panic!("Bad config!");
@ -61,7 +61,7 @@ pub enum AnalyticUnitConfig {
impl AnalyticUnitConfig {
// return tru if patch is different type
// return true if patch is different type
pub fn patch(&self, patch: PatchConfig) -> (AnalyticUnitConfig, bool) {
match patch {
PatchConfig::Pattern(tcfg) => match self.clone() {