mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-05 05:12:36 +02:00
Streamline startup (#79)
* Separate Prom metrics, different processors as different jobs * Create producers before consumers, may streamline startup. * Bump version * Add Pulsar init command, will replace pulsar-admin invocations. * Integrate tg-init-pulsar with YAMLs * Update YAMLs
This commit is contained in:
parent
5e8a1520ee
commit
14d79ef9f1
26 changed files with 684 additions and 550 deletions
|
|
@ -63,16 +63,16 @@ class ConsumerProducer(BaseProcessor):
|
|||
if output_schema == None:
|
||||
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(
|
||||
topic=output_queue,
|
||||
schema=JsonSchema(output_schema),
|
||||
)
|
||||
|
||||
self.consumer = self.client.subscribe(
|
||||
input_queue, subscriber,
|
||||
schema=JsonSchema(input_schema),
|
||||
)
|
||||
|
||||
def run(self):
|
||||
|
||||
__class__.state_metric.state('running')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue