本文整理汇总了Python中Ganga.Lib.MonitoringServices.Dashboard.CommonUtil.hostname方法的典型用法代码示例。如果您正苦于以下问题:Python CommonUtil.hostname方法的具体用法?Python CommonUtil.hostname怎么用?Python CommonUtil.hostname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ganga.Lib.MonitoringServices.Dashboard.CommonUtil
的用法示例。
在下文中一共展示了CommonUtil.hostname方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cl_target
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import hostname [as 别名]
def cl_target(job):
"""Build target. Only run on client."""
if hasattr(job.backend, 'CE'):
targets = []
if job.backend.CE:
targets.append('CE_%s' % job.backend.CE)
for site in job.backend.requirements.sites:
if site:
targets.append('SITE_%s' % site)
targetcsv = ','.join(targets)
return CommonUtil.strip_to_none(targetcsv)
else:
return CommonUtil.hostname()
示例2: wn_dest_wn
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import hostname [as 别名]
def wn_dest_wn():
"""Build dest_wn. Only run on worker node."""
return CommonUtil.hostname()
示例3: cl_jstoolui
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import hostname [as 别名]
def cl_jstoolui():
"""Build jstoolui. Only run on client."""
return CommonUtil.hostname()