From ce024b3c6d51fd198262544652ae94e119277e76 Mon Sep 17 00:00:00 2001 From: "Adam.Dybbroe" Date: Wed, 19 Jul 2023 16:16:14 +0200 Subject: [PATCH] Leave out ssh and hostname from the URI in the output message Signed-off-by: Adam.Dybbroe --- activefires_pp/post_processing.py | 2 +- activefires_pp/tests/test_messaging.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activefires_pp/post_processing.py b/activefires_pp/post_processing.py index d69cdbd..ce3ba56 100644 --- a/activefires_pp/post_processing.py +++ b/activefires_pp/post_processing.py @@ -588,7 +588,7 @@ def _generate_output_message(self, filepath, input_msg, region=None): """Create the output message to publish.""" output_topic = generate_posttroll_topic(self.output_topic, region) to_send = prepare_posttroll_message(input_msg, region) - to_send['uri'] = ('ssh://%s/%s' % (self.host, filepath)) + to_send['uri'] = str(filepath) to_send['uid'] = os.path.basename(filepath) to_send['type'] = 'GEOJSON-filtered' to_send['format'] = 'geojson' diff --git a/activefires_pp/tests/test_messaging.py b/activefires_pp/tests/test_messaging.py index a2de03e..5bda7d1 100644 --- a/activefires_pp/tests/test_messaging.py +++ b/activefires_pp/tests/test_messaging.py @@ -175,7 +175,7 @@ def test_prepare_posttroll_message(setup_comm, get_config, gethostname): assert res_msg.data['format'] == 'geojson' assert res_msg.data['product'] == 'afimg' assert res_msg.subject == '/VIIRS/L2/Fires/PP/National' - assert res_msg.data['uri'] == 'ssh://my.host.name//my/geojson/file/path' + assert res_msg.data['uri'] == '/my/geojson/file/path' input_msg = Message.decode(rawstr=TEST_MSG)