Skip to content

Commit

Permalink
fix monitoring topic
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Mar 13, 2024
1 parent 1d69f72 commit c4124b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wis2_gdc/registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def register(self, metadata: dict) -> None:
self.metadata = metadata

self.centre_id = self.metadata['id'].split(':')[3]
topic = f"report/a/wis2/{self.centre_id}"
topic = f'monitor/a/wis2/{CENTRE_ID}/{self.centre_id}'
centre_id_labels = [self.centre_id, CENTRE_ID]

LOGGER.debug(f'Metadata: {json.dumps(self.metadata, indent=4)}')

LOGGER.info('Running ETS')
ets_results = self._run_ets()

if self.broker is not None:
if PUBLISH_REPORTS:
LOGGER.info('Publishing ETS report to broker')
self.broker.pub(topic, json.dumps(ets_results))

Expand Down Expand Up @@ -129,8 +129,9 @@ def register(self, metadata: dict) -> None:
if RUN_KPI:
LOGGER.info('Running KPI')
kpi_results = self._run_kpi()
LOGGER.info(f'RESULTS {kpi_results}')

if self.broker is not None:
if PUBLISH_REPORTS:
LOGGER.info('Publishing KPI report to broker')
self.broker.pub(topic, json.dumps(kpi_results))

Expand Down

0 comments on commit c4124b1

Please sign in to comment.