本文整理汇总了Python中pandatools.Client.getFilesInShadowDataset方法的典型用法代码示例。如果您正苦于以下问题:Python Client.getFilesInShadowDataset方法的具体用法?Python Client.getFilesInShadowDataset怎么用?Python Client.getFilesInShadowDataset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandatools.Client
的用法示例。
在下文中一共展示了Client.getFilesInShadowDataset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: retry
# 需要导入模块: from pandatools import Client [as 别名]
# 或者: from pandatools.Client import getFilesInShadowDataset [as 别名]
#.........这里部分代码省略.........
for idx in range(len(jobList)):
job = pandaJobs[idx]
# skip exired
if job == None:
tmpLog.warning("Could not retry jobs older than 30 days : JobID=%s (PandaID=%s) expired" \
% (JobID,jobList[idxJob]))
return
# skip jobs reassigned by rebrokerage
if (job.jobStatus == 'cancelled' and job.taskBufferErrorCode in [105,'105']) or \
(job.jobStatus == 'failed' and job.taskBufferErrorCode in [106,'106']):
# extract JobIDs of reassigned jobs
tmpM = re.search('JobsetID=(\d+) JobID=(\d+)',job.taskBufferErrorDiag)
if tmpM != None:
tmpRebKey = (tmpM.group(1),tmpM.group(2))
if not rebroMap.has_key(tmpRebKey):
rebroMap[tmpRebKey] = 0
# count # of reassigned jobs
rebroMap[tmpRebKey] += 1
continue
# get shadow list
if (not ignoreDuplication) and outDsName == None and job.prodSourceLabel == 'user':
# look for dataset for log since it doesn't have suffix even when --individualOutDS is used
for tmpFile in job.Files:
if tmpFile.type == 'log':
outDsName = tmpFile.dataset
break
# output dataset was not found
if outDsName == None:
tmpLog.error("Could not get output dataset name for JobID=%s (PandaID=%s)" \
% (JobID,job.PandaID))
return
# get files in shadow
if outDsName.endswith('/'):
shadowList = Client.getFilesInShadowDataset(
outDsName,
Client.suffixShadow,
self.verbose)
else:
# disable duplication check mainly for old overlay jobs since non-signal files are wrongly skipped
#shadowList = Client.getFilesInShadowDatasetOld(outDsName,Client.suffixShadow,self.verbose)
pass
# unify sitename
if retrySite == None:
retrySite = job.computingSite
retryElement = job.computingElement
retryDestSE = job.destinationSE
# reset
job.jobStatus = None
job.commandToPilot = None
job.startTime = None
job.endTime = None
job.attemptNr = 1+job.attemptNr
for attr in job._attributes:
if attr.endswith('ErrorCode') or attr.endswith('ErrorDiag'):
setattr(job,attr,None)
job.transExitCode = None
job.computingSite = retrySite
job.computingElement = retryElement
job.destinationSE = retryDestSE
job.dispatchDBlock = None
if not unsetRetryID:
job.jobExecutionID = JobID
job.jobDefinitionID = newJobdefID
job.parentID = job.PandaID
if job.jobsetID != ['NULL',None,-1]:
if not unsetRetryID: