From c27015dc8696d035815ea6d2620de90492aa93c6 Mon Sep 17 00:00:00 2001 From: Benjamin Braatz Date: Tue, 5 Oct 2021 21:15:43 +0200 Subject: [PATCH] Rotate messages before sending to graph. --- controlpi_plugins/graph.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controlpi_plugins/graph.py b/controlpi_plugins/graph.py index 7e4ffad..f13d9c1 100644 --- a/controlpi_plugins/graph.py +++ b/controlpi_plugins/graph.py @@ -51,9 +51,10 @@ class Graph(BasePlugin): if comessage_guid: await self._call('verknuepfe', [comessage_guid, self._coroot_guid]) - await self._call('setze', [comessage_guid, 'comessage_json', - json.dumps(self._messages)]) + messages = self._messages self._messages = [] + await self._call('setze', [comessage_guid, 'comessage_json', + json.dumps(messages)]) await self._call('setze', [comessage_guid, 'comessage_ready', True]) else: -- 2.34.1