Skip to content
Snippets Groups Projects
Unverified Commit 0c8cc106 authored by REIG Julien's avatar REIG Julien
Browse files

fix internal url

parent fcfd16a3
No related branches found
No related tags found
1 merge request!12Fix: Connection between nodes
......@@ -3,16 +3,16 @@ import sys
from urllib.parse import urlparse
import requests
from models.command import Command
from models.command import Command
from models.resource import Resource
from utils.database_utils import insert_command_queue, insert_resource_queue
nodes = {
'http://localhost:3000/': 'node1',
'http://localhost:3001/': 'node2',
'http://localhost:3002/': 'node3',
'http://localhost:3003/': 'node4',
'http://localhost:3000/': 'http://node1:3000/',
'http://localhost:3001/': 'http://node2:3000/',
'http://localhost:3002/': 'http://node3:3000/',
'http://localhost:3003/': 'http://node4:3000/',
}
......@@ -22,7 +22,7 @@ def normalize_url(url: str, inter: bool = False):
if inter:
url = nodes.get(url,None)
if url is None:
print('normalize intern', address, e, file=sys.stderr)
print('normalize intern', url, file=sys.stderr)
return
return url
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment