Skip to content

Commit

Permalink
fix: remove wrong commit file (#2277)
Browse files Browse the repository at this point in the history
* fix(helper): fix get ip
  • Loading branch information
hanxiao authored Apr 2, 2021
1 parent 075ff07 commit ff2e9a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jina/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,15 +1042,13 @@ def get_internal_ip():
return ip


@functools.lru_cache(maxsize=1)
def get_public_ip():
"""
Return the public IP address of the gateway for connecting from other machine in the public network.
:return: Public IP address.
"""
import urllib.request
from threading import Thread

timeout = 0.5

Expand All @@ -1072,7 +1070,7 @@ def _get_ip(url):
threads = []

for idx, ip in enumerate(ip_server_list):
t = Thread(target=_get_ip, args=(ip,))
t = threading.Thread(target=_get_ip, args=(ip,))
threads.append(t)
t.start()

Expand Down
Empty file removed test.py
Empty file.

0 comments on commit ff2e9a5

Please sign in to comment.