本文整理汇总了Python中userinterface.Client.queryPandaIDs方法的典型用法代码示例。如果您正苦于以下问题:Python Client.queryPandaIDs方法的具体用法?Python Client.queryPandaIDs怎么用?Python Client.queryPandaIDs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类userinterface.Client
的用法示例。
在下文中一共展示了Client.queryPandaIDs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FileSpec
# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import queryPandaIDs [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
示例2: len
# 需要导入模块: from userinterface import Client [as 别名]
# 或者: from userinterface.Client import queryPandaIDs [as 别名]
import sys
import userinterface.Client as Client
if len(sys.argv) == 2:
jobDefIDs = [sys.argv[1]]
else:
startID = int(sys.argv[1])
endID = int(sys.argv[2])
if startID > endID:
print '%d is less than %d' % (endID,startID)
sys.exit(1)
jobDefIDs = range(startID,endID+1)
# quesry PandaID
status, ids = Client.queryPandaIDs(jobDefIDs)
if status != 0:
sys.exit(0)
# remove None
while True:
if not None in ids:
break
ids.remove(None)
# kill
if len(ids) != 0:
Client.killJobs(ids)