Skip to content

Commit

Permalink
fixed hostname parenthesis issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AadilLatif committed Apr 4, 2024
1 parent de5a1a4 commit deb5bd4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions broker/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
WIRING_DIAGRAM_FILENAME = "system.json"
WIRING_DIAGRAM : WiringDiagram | None = None

# def test_function(json_file = r"C:/Users/alatif/Documents/GitHub/sgidal-example/scenarios/system.json"):
# global WIRING_DIAGRAM
# data = json.load(open(json_file, "r"))
# WIRING_DIAGRAM = WiringDiagram(**data)

def build_url(host:str, port:int, enpoint:list):
if is_kubernetes_env:
KUBERNETES_SERVICE_NAME = os.environ['KUBERNETES_SERVICE_NAME']
Expand Down Expand Up @@ -80,7 +75,7 @@ async def upload_profiles(file: UploadFile):
try:
component_map, _, _ = read_settings()
for hostname in component_map:
if "feeder" in hostname():
if "feeder" in hostname:
ip = hostname
port = component_map[hostname]
data = file.file.read()
Expand Down Expand Up @@ -108,7 +103,7 @@ async def upload_model(file: UploadFile):
try:
component_map, _, _ = read_settings()
for hostname in component_map:
if "feeder" in hostname():
if "feeder" in hostname:
ip = hostname
port = component_map[hostname]
data = file.file.read()
Expand Down Expand Up @@ -136,7 +131,7 @@ def download_results():
component_map, _, _ = read_settings()

for hostname in component_map:
if "recorder" in hostname():
if "recorder" in hostname:
host = hostname
port = component_map[hostname]

Expand Down

0 comments on commit deb5bd4

Please sign in to comment.