From b1e8e81f82555adc1823c447b4aa1e91c14ad6b2 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 26 Aug 2024 15:06:51 +0100 Subject: [PATCH] FIX: Remove `octue.services` prefix from subscription names --- octue/cloud/pub_sub/service.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/octue/cloud/pub_sub/service.py b/octue/cloud/pub_sub/service.py index e94b6d5e2..3b22d24d2 100644 --- a/octue/cloud/pub_sub/service.py +++ b/octue/cloud/pub_sub/service.py @@ -149,7 +149,7 @@ def serve(self, timeout=None, delete_topic_and_subscription_on_exit=False, allow logger.info("Starting %r.", self) subscription = Subscription( - name=".".join((OCTUE_SERVICES_PREFIX, self._pub_sub_id)), + name=self._pub_sub_id, topic=self.services_topic, filter=f'attributes.recipient = "{self.id}" AND attributes.sender_type = "{PARENT_SENDER_TYPE}"', expiration_time=None, @@ -344,10 +344,8 @@ def ask( # If not using a service registry, check for that the service revision exists by checking for its subscription. elif service_revision_tag: - pub_sub_id = convert_service_id_to_pub_sub_form(service_id) - service_revision_subscription = Subscription( - name=".".join((OCTUE_SERVICES_PREFIX, pub_sub_id)), + name=convert_service_id_to_pub_sub_form(service_id), topic=self.services_topic, ) @@ -379,7 +377,7 @@ def ask( answer_subscription = None else: answer_subscription = Subscription( - name=".".join((OCTUE_SERVICES_PREFIX, self._pub_sub_id, ANSWERS_NAMESPACE, question_uuid)), + name=".".join((self._pub_sub_id, ANSWERS_NAMESPACE, question_uuid)), topic=self.services_topic, filter=( f'attributes.recipient = "{self.id}" '