From b5a5b41da9d3c0d08a13e5b9d35af36a3a62067c Mon Sep 17 00:00:00 2001 From: Bryce Bixler Date: Thu, 10 Oct 2024 17:32:23 +0000 Subject: [PATCH] Added session.degraded flag --- socs/agents/hwp_pid/agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/socs/agents/hwp_pid/agent.py b/socs/agents/hwp_pid/agent.py index 38c1ed84d..de10315f6 100644 --- a/socs/agents/hwp_pid/agent.py +++ b/socs/agents/hwp_pid/agent.py @@ -132,10 +132,10 @@ def _get_data_and_publish(self, pid: pd.PID, session: ocs_agent.OpSession): pid_state = get_pid_state(pid) if pid_state['healthy']: - pid_state['state'].update({'quality': 'ok'}) + session.degraded = False else: print('Warning: state monitor degraded') - pid_state['state'].update({'quality': 'degraded'}) + session.degraded = True data['data'].update(pid_state['state']) session.data.update(pid_state['state'])