mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-16 16:51:02 +02:00
Create producers before consumers, may streamline startup.
This commit is contained in:
parent
8c3ac009da
commit
e22d174875
1 changed files with 5 additions and 5 deletions
|
|
@ -63,16 +63,16 @@ class ConsumerProducer(BaseProcessor):
|
||||||
if output_schema == None:
|
if output_schema == None:
|
||||||
raise RuntimeError("output_schema must be specified")
|
raise RuntimeError("output_schema must be specified")
|
||||||
|
|
||||||
self.consumer = self.client.subscribe(
|
|
||||||
input_queue, subscriber,
|
|
||||||
schema=JsonSchema(input_schema),
|
|
||||||
)
|
|
||||||
|
|
||||||
self.producer = self.client.create_producer(
|
self.producer = self.client.create_producer(
|
||||||
topic=output_queue,
|
topic=output_queue,
|
||||||
schema=JsonSchema(output_schema),
|
schema=JsonSchema(output_schema),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.consumer = self.client.subscribe(
|
||||||
|
input_queue, subscriber,
|
||||||
|
schema=JsonSchema(input_schema),
|
||||||
|
)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
__class__.state_metric.state('running')
|
__class__.state_metric.state('running')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue