本文整理匯總了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: