Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Apr 15, 2024
1 parent 439b9d0 commit da8b19c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions algo/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def check_input(self, value, timestamp):

if sample_is_anomalous:
result['device_id'] = self.device_id
result['initial_phase'] = ''
util.logger.info(f"{LOG_PREFIX}: Anomaly occured: {result}")
anomaly_results.append(result)
return anomaly_results
Expand Down
6 changes: 4 additions & 2 deletions algo/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ def generate_init_message(self, minutes_until_start=None):
return {
"type": "",
"sub_type": "",
"unit": "",
"value": "",
"threshold": 0,
"mean": 0,
"initial_phase": f"Die Anwendung befindet sich noch für ca. {minutes_until_start} Minuten in der Initialisierungsphase"
}

Expand All @@ -127,8 +128,9 @@ def reset_init_phase(self):
self.produce({
"type": "",
"sub_type": "",
"unit": "",
"value": "",
"threshold": 0,
"mean": 0,
"initial_phase": ""
})
self.init_phase_resetted = True
Expand Down

0 comments on commit da8b19c

Please sign in to comment.