Skip to content

Commit

Permalink
Hack to use hostname -s as a node name
Browse files Browse the repository at this point in the history
  • Loading branch information
mr0re1 authored and tpdownes committed May 28, 2024
1 parent e61d927 commit e33c07e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,8 @@ def compute(self):
return compute_service()

@cached_property
def hostname(self):
return socket.gethostname()
def hostname_short(self):
return socket.gethostname().split(".")[0]

@cached_property
def hostname_fqdn(self):
Expand All @@ -1485,7 +1485,7 @@ def enable_job_exclusive(self):
def _node_desc(self, node_name):
"""Get parts from node name"""
if not node_name:
node_name = self.hostname
node_name = self.hostname_short
m = self.node_desc_regex.match(node_name)
if not m:
raise Exception(f"node name {node_name} is not valid")
Expand Down

0 comments on commit e33c07e

Please sign in to comment.