File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 114
114
OVERRIDE_PROCS = None # number of physical cpus. ex: None or 2
115
115
OVERRIDE_MEMORY = None # in Kb
116
116
OVERRIDE_NIMBY = None # True to turn on, False to turn off
117
+ OVERRIDE_HOSTNAME = None # Force to use this hostname
117
118
ALLOW_GPU = False
118
119
ALLOW_PLAYBLAST = False
119
120
LOAD_MODIFIER = 0 # amount to add/subtract from load
175
176
CUEBOT_HOSTNAME = config .get (__section , "OVERRIDE_CUEBOT" )
176
177
if config .has_option (__section , "OVERRIDE_NIMBY" ):
177
178
OVERRIDE_NIMBY = config .getboolean (__section , "OVERRIDE_NIMBY" )
179
+ if config .has_option (__section , "OVERRIDE_HOSTNAME" ):
180
+ OVERRIDE_HOSTNAME = config .get (__section , "OVERRIDE_HOSTNAME" )
178
181
if config .has_option (__section , "GPU" ):
179
182
ALLOW_GPU = config .getboolean (__section , "GPU" )
180
183
if config .has_option (__section , "PLAYBLAST" ):
Original file line number Diff line number Diff line change @@ -149,7 +149,9 @@ def getHostIp():
149
149
def getHostname ():
150
150
"""Returns the machine's fully qualified domain name"""
151
151
try :
152
- if rqd .rqconstants .RQD_USE_IP_AS_HOSTNAME :
152
+ if rqd .rqconstants .OVERRIDE_HOSTNAME :
153
+ return rqd .rqconstants .OVERRIDE_HOSTNAME
154
+ elif rqd .rqconstants .RQD_USE_IP_AS_HOSTNAME :
153
155
return getHostIp ()
154
156
else :
155
157
return socket .gethostbyaddr (socket .gethostname ())[0 ].split ('.' )[0 ]
You can’t perform that action at this time.
0 commit comments