summaryrefslogtreecommitdiffstats
path: root/ml/ml.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ml/ml.cc')
-rw-r--r--ml/ml.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/ml/ml.cc b/ml/ml.cc
index 2a0df8867c..461c83baae 100644
--- a/ml/ml.cc
+++ b/ml/ml.cc
@@ -156,7 +156,14 @@ void ml_start_anomaly_detection_threads(RRDHOST *RH) {
void ml_stop_anomaly_detection_threads(RRDHOST *RH) {
if (RH && RH->ml_host) {
Host *H = reinterpret_cast<Host *>(RH->ml_host);
- H->stopAnomalyDetectionThreads();
+ H->stopAnomalyDetectionThreads(true);
+ }
+}
+
+void ml_cancel_anomaly_detection_threads(RRDHOST *RH) {
+ if (RH && RH->ml_host) {
+ Host *H = reinterpret_cast<Host *>(RH->ml_host);
+ H->stopAnomalyDetectionThreads(false);
}
}