mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
Fixing service wiring
This commit is contained in:
parent
3d61ecd060
commit
a625efb94b
4 changed files with 124 additions and 21 deletions
|
|
@ -255,13 +255,13 @@ class ToolServiceImpl:
|
|||
# If topic already contains "://", assume it's a full Pulsar URI
|
||||
# Otherwise, construct default path
|
||||
if '://' in self.service_topic:
|
||||
# Full Pulsar URI provided
|
||||
request_topic = f"{self.service_topic}-request"
|
||||
response_topic = f"{self.service_topic}-response"
|
||||
# Full Pulsar URI provided - use as base for request/response
|
||||
request_topic = self.service_topic.replace("://tg/", "://tg/request/")
|
||||
response_topic = self.service_topic.replace("://tg/", "://tg/response/")
|
||||
else:
|
||||
# Construct default path matching DynamicToolService pattern
|
||||
request_topic = f"non-persistent://tg/request/{self.service_topic}-request"
|
||||
response_topic = f"non-persistent://tg/response/{self.service_topic}-response"
|
||||
request_topic = f"non-persistent://tg/request/{self.service_topic}"
|
||||
response_topic = f"non-persistent://tg/response/{self.service_topic}"
|
||||
|
||||
request_metrics = ProducerMetrics(
|
||||
processor=self.processor.id,
|
||||
|
|
|
|||
|
|
@ -174,6 +174,11 @@ class Processor(DynamicToolService):
|
|||
@staticmethod
|
||||
def add_args(parser):
|
||||
DynamicToolService.add_args(parser)
|
||||
# Override the topic default for this service
|
||||
for action in parser._actions:
|
||||
if '--topic' in action.option_strings:
|
||||
action.default = default_topic
|
||||
break
|
||||
|
||||
|
||||
def run():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue