diff --git a/src/seer/anomaly_detection/accessors.py b/src/seer/anomaly_detection/accessors.py index 95ef132b2..13400e439 100644 --- a/src/seer/anomaly_detection/accessors.py +++ b/src/seer/anomaly_detection/accessors.py @@ -41,6 +41,7 @@ def save_alert( timeseries: List[TimeSeriesPoint], anomalies: TimeSeriesAnomalies, anomaly_algo_data: dict, + task_flag: str, ): return NotImplemented @@ -145,6 +146,7 @@ def save_alert( timeseries: List[TimeSeriesPoint], anomalies: TimeSeriesAnomalies, anomaly_algo_data: dict, + task_flag: str, ): with Session() as session: existing_records = ( @@ -183,6 +185,7 @@ def save_alert( for i, point in enumerate(timeseries) ], anomaly_algo_data=anomaly_algo_data, + task_flag=task_flag, ) session.add(new_record) session.commit() diff --git a/src/seer/anomaly_detection/anomaly_detection.py b/src/seer/anomaly_detection/anomaly_detection.py index e25c44681..7736b456b 100644 --- a/src/seer/anomaly_detection/anomaly_detection.py +++ b/src/seer/anomaly_detection/anomaly_detection.py @@ -97,6 +97,7 @@ def _online_detect( Returns: Tuple with input timeseries and identified anomalies """ + logger.info(f"Detecting anomalies for alert ID: {alert.id}") ts_external: List[TimeSeriesPoint] = [] if alert.cur_window: @@ -296,6 +297,7 @@ def store_data( timeseries=ts, anomalies=anomalies, anomaly_algo_data={"window_size": anomalies.window_size}, + task_flag="not_queued", ) return StoreDataResponse(success=True)