Skip to content

Commit

Permalink
Revert "add notification to refresh data mappings"
Browse files Browse the repository at this point in the history
This reverts commit 951f336.
  • Loading branch information
tomkralidis committed Feb 6, 2024
1 parent 15ab40b commit feb286e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
23 changes: 1 addition & 22 deletions wis2box-management/wis2box/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,13 @@
import click
import logging

from wis2box import cli_helpers
from wis2box.api.backend import load_backend
from wis2box.api.config import load_config
from wis2box.env import (BROKER_HOST, BROKER_USERNAME, BROKER_PASSWORD,
BROKER_PORT)
from wis2box.plugin import load_plugin, PLUGINS

from wis2box import cli_helpers

LOGGER = logging.getLogger(__name__)


def refresh_data_mappings():
# load plugin for local broker
defs_local = {
'codepath': PLUGINS['pubsub']['mqtt']['plugin'],
'url': f'mqtt://{BROKER_USERNAME}:{BROKER_PASSWORD}@{BROKER_HOST}:{BROKER_PORT}', # noqa
'client_type': 'dataset-manager'
}
local_broker = load_plugin('pubsub', defs_local)
local_broker.pub('wis2box/data_mappings/refresh', '{}', qos=0)


def setup_collection(meta: dict = {}) -> bool:
"""
Add collection to api backend and configuration
Expand Down Expand Up @@ -81,9 +66,6 @@ def setup_collection(meta: dict = {}) -> bool:
LOGGER.error(msg)
return False

LOGGER.debug('Refreshing data mappings')
refresh_data_mappings()

return True


Expand Down Expand Up @@ -128,9 +110,6 @@ def remove_collection(collection_id: str, backend: bool = True,
msg = f'discovery metadata {collection_id} not found'
LOGGER.warning(msg)

LOGGER.debug('Refreshing data mappings')
refresh_data_mappings()

return True


Expand Down
1 change: 0 additions & 1 deletion wis2box-management/wis2box/topic_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def validate_and_load(topic_hierarchy: str,
"""

LOGGER.debug(f'Validating topic hierarchy: {topic_hierarchy}')
LOGGER.debug(f'Data mappings {data_mappings}')

th = TopicHierarchy(topic_hierarchy)
found = False
Expand Down

0 comments on commit feb286e

Please sign in to comment.