Skip to content

Commit

Permalink
call get_ip only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Apr 26, 2024
1 parent 7469d43 commit c0901d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion JobRunner/Callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class Callback():
def __init__(self):
workdir = os.environ.get("JOB_DIR", '/tmp/')
self.conf = Config(job_id="callback", workdir=workdir, use_ee2=False)
self.ip = os.environ.get('CALLBACK_IP', get_ip())
self.ip = os.environ.get('CALLBACK_IP')
if not self.ip:
self.ip = get_ip()
self.port = os.environ.get('CALLBACK_PORT')
self.cbs = None
self.callback_url = None
Expand Down

0 comments on commit c0901d0

Please sign in to comment.