From fd749466b6c3875d3f46d154704f26c011af3118 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Wed, 17 Dec 2025 16:02:10 +0000 Subject: [PATCH] Fixing incomplete porting --- trustgraph-base/trustgraph/base/async_processor.py | 11 +++-------- trustgraph-flow/trustgraph/gateway/service.py | 11 ----------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/trustgraph-base/trustgraph/base/async_processor.py b/trustgraph-base/trustgraph/base/async_processor.py index c8f43b8c..8068c67d 100644 --- a/trustgraph-base/trustgraph/base/async_processor.py +++ b/trustgraph-base/trustgraph/base/async_processor.py @@ -37,8 +37,8 @@ class AsyncProcessor: # Create pub/sub backend via factory self.pubsub_backend = get_pubsub(**params) - # Keep old PulsarClient for backward compatibility with pulsar_host property - self.pulsar_client_object = PulsarClient(**params) + # Store pulsar_host for backward compatibility + self._pulsar_host = params.get("pulsar_host", "pulsar://pulsar:6650") # Initialise metrics, records the parameters ProcessorMetrics(processor = self.id).info({ @@ -100,7 +100,6 @@ class AsyncProcessor: # functionality def stop(self): self.pubsub_backend.close() - self.pulsar_client.close() self.running = False # Returns the pub/sub backend (new interface) @@ -109,11 +108,7 @@ class AsyncProcessor: # Returns the pulsar host (backward compatibility) @property - def pulsar_host(self): return self.pulsar_client_object.pulsar_host - - # Returns the pulsar client (backward compatibility) - @property - def pulsar_client(self): return self.pulsar_client_object.client + def pulsar_host(self): return self._pulsar_host # Register a new event handler for configuration change def register_config_handler(self, handler): diff --git a/trustgraph-flow/trustgraph/gateway/service.py b/trustgraph-flow/trustgraph/gateway/service.py index e49b083c..aaa6f725 100755 --- a/trustgraph-flow/trustgraph/gateway/service.py +++ b/trustgraph-flow/trustgraph/gateway/service.py @@ -54,17 +54,6 @@ class Api: # Create backend using factory self.pubsub_backend = get_pubsub(**config) - # Keep pulsar_client for backward compatibility with existing gateway code - if self.pulsar_api_key: - self.pulsar_client = pulsar.Client( - self.pulsar_host, listener_name=self.pulsar_listener, - authentication=pulsar.AuthenticationToken(self.pulsar_api_key) - ) - else: - self.pulsar_client = pulsar.Client( - self.pulsar_host, listener_name=self.pulsar_listener, - ) - self.prometheus_url = config.get( "prometheus_url", default_prometheus_url, )