Skip to content

Commit

Permalink
♻️ rabbitmq queue names ⚠️🚨 (#5931)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Neagu <[email protected]>
  • Loading branch information
GitHK and Andrei Neagu authored Jun 11, 2024
1 parent 9321b20 commit 9e48b49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/service-library/src/servicelib/rabbitmq/_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import os
import socket
from typing import Any, Final

Expand Down Expand Up @@ -52,7 +51,7 @@ async def wait_till_rabbitmq_responsive(url: str) -> bool:


def get_rabbitmq_client_unique_name(base_name: str) -> str:
return f"{base_name}_{socket.gethostname()}_{os.getpid()}"
return f"{base_name}_{socket.gethostname()}"


async def declare_queue(
Expand Down
8 changes: 4 additions & 4 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ services:
webserver:
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
init: true
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
hostname: "wb-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
environment: &webserver_environment
AIODEBUG_SLOW_DURATION_SECS: ${AIODEBUG_SLOW_DURATION_SECS}

Expand Down Expand Up @@ -734,7 +734,7 @@ services:
wb-api-server:
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
init: true
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
hostname: "api-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
environment:
<<: *webserver_environment
WEBSERVER_HOST: ${WB_API_WEBSERVER_HOST}
Expand All @@ -747,7 +747,7 @@ services:
wb-db-event-listener:
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
init: true
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
hostname: "db-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
environment:
WEBSERVER_LOGLEVEL: ${WB_DB_EL_LOGLEVEL}

Expand Down Expand Up @@ -831,7 +831,7 @@ services:
wb-garbage-collector:
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
init: true
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
hostname: "gc-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
environment:
WEBSERVER_LOGLEVEL: ${WB_GC_LOGLEVEL}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def subscribe_to_rabbitmq(
)
for p in exchange_to_parser_config
),
reraise=False,
reraise=True,
)
return {
exchange_name: queue_name
Expand Down

0 comments on commit 9e48b49

Please sign in to comment.