本文整理汇总了Python中Ganga.Lib.LCG.Grid.get_output方法的典型用法代码示例。如果您正苦于以下问题:Python Grid.get_output方法的具体用法?Python Grid.get_output怎么用?Python Grid.get_output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ganga.Lib.LCG.Grid
的用法示例。
在下文中一共展示了Grid.get_output方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process
# 需要导入模块: from Ganga.Lib.LCG import Grid [as 别名]
# 或者: from Ganga.Lib.LCG.Grid import get_output [as 别名]
def process(self, item):
"""
downloads output of one LCG job
"""
pps_check = (True, None)
job = item.jobObj
# it is very likely that the job's downloading task has been
# created and assigned in a previous monitoring loop
# ignore such kind of cases
if job.status in ['completing', 'completed', 'failed']:
return True
# it can also happen that the job was killed/removed by user between
# the downloading task was created in queue and being taken by one of
# the downloading thread. Ignore suck kind of cases
if job.status in ['removed', 'killed']:
return True
job.updateStatus('completing')
outw = job.getOutputWorkspace()
pps_check = Grid.get_output(job.backend.id, outw.getPath(), job.backend.credential_requirements)
if pps_check[0]:
job.updateStatus('completed')
job.backend.exitcode = 0
else:
job.updateStatus('failed')
# update the backend's reason if the failure detected in the
# Ganga's pps
if pps_check[1] != 0:
job.backend.reason = 'non-zero app. exit code: %s' % pps_check[
1]
job.backend.exitcode = pps_check[1]
# needs to update the master job's status to give an up-to-date status
# of the whole job
if job.master:
job.master.updateMasterJobStatus()
self.__appendResult__(job.getFQID('.'), True)
return True