From 8844a616e6fec3e01426a50e2d03ae75c0359af3 Mon Sep 17 00:00:00 2001 From: Matthew Hasselfield Date: Fri, 3 Nov 2023 15:13:24 +0000 Subject: [PATCH] ACU: fix bug where empty blocks were pushed to feed This wasn't causing any trouble other than lots of log messages in influxpublisher. --- socs/agents/acu/agent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/socs/agents/acu/agent.py b/socs/agents/acu/agent.py index a104e6482..a8fcc4a4a 100644 --- a/socs/agents/acu/agent.py +++ b/socs/agents/acu/agent.py @@ -640,7 +640,9 @@ def monitor(self, session, params): del new_influx_blocks[k] for block in new_influx_blocks.values(): - self.agent.publish_to_feed('acu_status_influx', block) + # Check that we have data (commands and corotator often don't) + if len(block['data']) > 0: + self.agent.publish_to_feed('acu_status_influx', block) influx_blocks.update(new_influx_blocks) # Assemble data for aggregator ...