Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs425_distributed_system_mp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hangxie2
cs425_distributed_system_mp
Commits
a64b97c2
There was an error fetching the commit references. Please try again later.
Commit
a64b97c2
authored
3 years ago
by
Hang
Browse files
Options
Downloads
Patches
Plain Diff
fast push
parent
1b9b678b
No related branches found
No related tags found
1 merge request
!10
MP3 Log Version Ready
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sample_test/src/server.py
+2
-1
2 additions, 1 deletion
sample_test/src/server.py
with
2 additions
and
1 deletion
sample_test/src/server.py
+
2
−
1
View file @
a64b97c2
...
...
@@ -429,7 +429,8 @@ def parse_config(config_path: str) -> dict:
def
map_hostname_to_ip
(
servers
):
for
server_id
,
server
in
servers
.
items
():
SERVER_ID_TO_IP_MAPPING
[
server_id
]
=
socket
.
gethostbyname
(
server
[
SERVER_ADDRESS
])
SERVER_ID_TO_IP_MAPPING
[
server_id
]
=
socket
.
gethostbyname
(
server
[
SERVER_ADDRESS
])
\
if
server
[
SERVER_ADDRESS
]
!=
'
localhost
'
else
socket
.
gethostbyname
(
socket
.
gethostname
())
IP_TO_SERVER_ID_MAPPING
[
SERVER_ID_TO_IP_MAPPING
[
server_id
]]
=
server_id
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment