当前位置: 首页>>代码示例>>Python>>正文


Python Grid.get_output方法代码示例

本文整理汇总了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
开发者ID:Erni1619,项目名称:ganga,代码行数:48,代码来源:LCGOutputDownloader.py


注:本文中的Ganga.Lib.LCG.Grid.get_output方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。