From e51f4de777b8cbaf34eaa08a8621008ea159c408 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 3 Jun 2024 06:16:58 -0400 Subject: [PATCH] subscribe to both origin and cache --- wis2-grep-management/docker/pywis-pubsub.yml | 3 ++- wis2-grep-management/wis2_grep/env.py | 3 +-- wis2-grep.env | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wis2-grep-management/docker/pywis-pubsub.yml b/wis2-grep-management/docker/pywis-pubsub.yml index 31b819c..3e576f1 100644 --- a/wis2-grep-management/docker/pywis-pubsub.yml +++ b/wis2-grep-management/docker/pywis-pubsub.yml @@ -1,7 +1,8 @@ broker: ${WIS2_GREP_GB} subscribe_topics: - - ${WIS2_GREP_GB_TOPIC} + - origin/a/wis2/# + - cache/a/wis2/# qos: 1 diff --git a/wis2-grep-management/wis2_grep/env.py b/wis2-grep-management/wis2_grep/env.py index 1894982..2ec035a 100644 --- a/wis2-grep-management/wis2_grep/env.py +++ b/wis2-grep-management/wis2_grep/env.py @@ -49,8 +49,7 @@ def str2bool(value: Any) -> bool: BACKEND_CONNECTION = os.environ.get('WIS2_GREP_BACKEND_CONNECTION') CENTRE_ID = os.environ.get('WIS2_GREP_CENTRE_ID') GB = os.environ.get('WIS2_GREP_GB') -GB_TOPIC = os.environ.get('WIS2_GREP_GB_TOPIC') if None in [API_URL, API_URL_DOCKER, BACKEND_TYPE, BACKEND_CONNECTION, - CENTRE_ID, GB, GB_TOPIC]: + CENTRE_ID, GB]: raise EnvironmentError('Environment variables not set!') diff --git a/wis2-grep.env b/wis2-grep.env index 00a3502..54fe992 100644 --- a/wis2-grep.env +++ b/wis2-grep.env @@ -6,4 +6,3 @@ export WIS2_GREP_BACKEND_CONNECTION=http://wis2-grep-backend:9200/wis2-notificat export WIS2_GREP_CENTRE_ID=ca-eccc-msc-global-replay #export WIS2_GREP_GB=mqtts://everyone:everyone@wis2globalbroker.nws.noaa.gov:8883 export WIS2_GREP_GB=mqtts://everyone:everyone@globalbroker.meteo.fr:8883 -export WIS2_GREP_GB_TOPIC=origin/a/wis2/#