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


Python Client.getJobStatus方法代码示例

本文整理汇总了Python中userinterface.Client.getJobStatus方法的典型用法代码示例。如果您正苦于以下问题:Python Client.getJobStatus方法的具体用法?Python Client.getJobStatus怎么用?Python Client.getJobStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在userinterface.Client的用法示例。


在下文中一共展示了Client.getJobStatus方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: eraseDispDatasets

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
def eraseDispDatasets(ids):
    print "eraseDispDatasets"
    datasets = []
    # get jobs
    status,jobs = Client.getJobStatus(ids)
    if status != 0:
        return
    # gather dispDBlcoks
    for job in jobs:
        # dispatchDS is not a DQ2 dataset in US
        if job.cloud == 'US':
            continue
        # erase disp datasets for production jobs only
        if job.prodSourceLabel != 'managed':
            continue
        for file in job.Files:
            if file.dispatchDBlock == 'NULL':
                continue
            if (not file.dispatchDBlock in datasets) and \
               re.search('_dis\d+$',file.dispatchDBlock) != None:
                datasets.append(file.dispatchDBlock)
    # erase
    for dataset in datasets:
        print 'erase %s' % dataset
        status,out = ddm.DQ2.main('eraseDataset',dataset)
        print out
开发者ID:EntityOfPlague,项目名称:panda-server,代码行数:28,代码来源:reassignSite.py

示例2: getJobStatus

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
 def getJobStatus(self, ids):
     import userinterface.Client as Client
     s,o = Client.getJobStatus(ids)
     result = {}
     if s != 0:
         _logger.error('Error response code: %s %s' %(str(s), str(o)))
         return result
     for x in o:
         result[x.PandaID] = x.jobStatus
     return result
开发者ID:tertychnyy,项目名称:panda-web-client,代码行数:12,代码来源:UserIF.py

示例3: getStatus

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
    def getStatus(self, expectedStates):

        idList = [job['jobID'] for job in self.__jobList]
        print idList
        status, jobInfoList = Client.getJobStatus(idList)
        print jobInfoList

        assert status == 0, "Retrieval of job state finished with status: %s" %status

        for job in jobInfoList:
            assert job.jobStatus in expectedStates, "Recently defined job was not in states %s (PandaID: %s jobStatus: %s)" %(expectedStates, job.PandaID, job.jobStatus)

        return jobInfoList
开发者ID:EntityOfPlague,项目名称:panda-server,代码行数:15,代码来源:testJobFlowATLAS.py

示例4: eraseDispDatasets

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
def eraseDispDatasets(ids):
    datasets = []
    # get jobs
    status,jobs = Client.getJobStatus(ids)
    if status != 0:
        return
    # gather dispDBlcoks
    for job in jobs:
        for file in job.Files:
            if not file.dispatchDBlock in datasets:
                datasets.append(file.dispatchDBlock)
    # erase
    for dataset in datasets:
        ddm.DQ2.main(['eraseDataset',datasets])
开发者ID:EntityOfPlague,项目名称:panda-server,代码行数:16,代码来源:reassignDefJobs.py

示例5: update_status

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
def update_status():
    # Method to sync PandaDB job status and local job status
    # show users jobs
    jobs = Job.query.filter(Job.pandaid.isnot(None))\
        .filter(~Job.status.in_(['finished', 'failed', 'cancelled']))\
        .all()

    ids = []
    localids = []
    for job in jobs:
        localids.append(job.id)
        ids.append(job.pandaid)

    # get status update
    if len(ids) > 0:
        _logger.debug('getJobStatus: ' + str(ids))
        s, o = Client.getJobStatus(ids)
        _logger.debug(o)
        _logger.debug(s)
        _logger.debug("---------------------")
        for job in jobs:
            if job.pandaid in ids:
                for obj in o:
                    if obj.PandaID == job.pandaid:
                        # Update attemptNr if changed
                        if job.attemptnr not in [obj.attemptNr]:
                            job.attemptnr = obj.attemptNr
                            jobs_.save(job)

                        # Update status if changed
                        if job.status != obj.jobStatus:
                            job.status = obj.jobStatus
                            job.modification_time = datetime.utcnow()
                            jobs_.save(job)

    return localids
开发者ID:RRCKI,项目名称:panda-web-client,代码行数:38,代码来源:scripts.py

示例6: SiteMapper

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
from taskbuffer.TaskBuffer import taskBuffer
from brokerage.SiteMapper import SiteMapper
from config import panda_config

# instantiate TB
taskBuffer.init(panda_config.dbhost,panda_config.dbpasswd,nDBConnection=1)
# instantiate sitemapper
siteMapper = SiteMapper(taskBuffer)


import httplib
import commands

id = sys.argv[1]
s,o = Client.getJobStatus([id])

if s != 0:
    print "failed to get job with:%s" % s
    sys.exit(0)

job = o[0]

if job == None:
    print "got None"
    sys.exit(0)

xml = """<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- ATLAS file meta-data catalog -->
<!DOCTYPE POOLFILECATALOG SYSTEM "InMemory">
<POOLFILECATALOG>
开发者ID:EntityOfPlague,项目名称:panda-server,代码行数:32,代码来源:finishJob.py

示例7: FileSpec

# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import getJobStatus [as 别名]
ids = {'pandatest.000003.dd.input._00028.junk':'6c19e1fc-ee8c-4bae-bd4c-c9e5c73aca27',
       'pandatest.000003.dd.input._00033.junk':'98f79ba1-1793-4253-aac7-bdf90a51d1ee',
       'pandatest.000003.dd.input._00039.junk':'33660dd5-7cef-422a-a7fc-6c24cb10deb1'}
for lfn in ids.keys():
    file = FileSpec()
    file.lfn = lfn
    file.GUID = ids[file.lfn]
    file.dataset = 'pandatest.000003.dd.input'
    file.type = 'input'
    job.addFile(file)

s,o = Client.submitJobs([job])
print "---------------------"
print s
print o
print "---------------------"
s,o = Client.getJobStatus([4934, 4766, 4767, 4768, 4769])
print s
if s == 0:
    for job in o:
        if job == None:
            continue
        print job.PandaID
        for file in job.Files:
            print file.lfn,file.type
print "---------------------"
s,o = Client.queryPandaIDs([0])
print s
print o

开发者ID:EntityOfPlague,项目名称:panda-server,代码行数:31,代码来源:testUser.py


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