From 97163c4ba3e25786b2cb30538a9d6dc8ad883d18 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Sat, 19 Apr 2025 10:33:58 +0100 Subject: [PATCH] Tweaked for upstream config --- trustgraph-base/trustgraph/base/flow_processor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trustgraph-base/trustgraph/base/flow_processor.py b/trustgraph-base/trustgraph/base/flow_processor.py index e6757e97..df33f911 100644 --- a/trustgraph-base/trustgraph/base/flow_processor.py +++ b/trustgraph-base/trustgraph/base/flow_processor.py @@ -25,7 +25,7 @@ class FlowProcessor(AsyncProcessor): super(FlowProcessor, self).__init__(**params) # Register configuration handler - self.register_config_handler(self.on_configuration) + self.register_config_handler(self.on_configure_flows) # Initialise flow information state self.flows = {} @@ -55,18 +55,18 @@ class FlowProcessor(AsyncProcessor): print("Stopped flow: ", flow, flush=True) # Event handler - called for a configuration change - async def on_configuration(self, config, version): + async def on_configure_flows(self, config, version): print("Got config version", version, flush=True) # Skip over invalid data - if "flows" not in config: return + if "flows-active" not in config: return # Check there's configuration information for me - if self.id in config["flows"]: + if self.id in config["flows-active"]: # Get my flow config - flow_config = json.loads(config["flows"][self.id]) + flow_config = json.loads(config["flows-active"][self.id]) # Get list of flows which should be running and are currently # running