本文整理汇总了Python中taskbuffer.FileSpec.FileSpec.attemptNr方法的典型用法代码示例。如果您正苦于以下问题:Python FileSpec.attemptNr方法的具体用法?Python FileSpec.attemptNr怎么用?Python FileSpec.attemptNr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类taskbuffer.FileSpec.FileSpec
的用法示例。
在下文中一共展示了FileSpec.attemptNr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: convertToJobFileSpec
# 需要导入模块: from taskbuffer.FileSpec import FileSpec [as 别名]
# 或者: from taskbuffer.FileSpec.FileSpec import attemptNr [as 别名]
def convertToJobFileSpec(self,datasetSpec,setType=None,useEventService=False):
jobFileSpec = JobFileSpec()
jobFileSpec.fileID = self.fileID
jobFileSpec.datasetID = datasetSpec.datasetID
jobFileSpec.jediTaskID = datasetSpec.jediTaskID
jobFileSpec.lfn = self.lfn
jobFileSpec.GUID = self.GUID
if setType == None:
jobFileSpec.type = self.type
else:
jobFileSpec.type = setType
jobFileSpec.scope = self.scope
jobFileSpec.fsize = self.fsize
jobFileSpec.checksum = self.checksum
jobFileSpec.attemptNr = self.attemptNr
# dataset attribute
if datasetSpec != None:
# dataset
if not datasetSpec.containerName in [None,'']:
jobFileSpec.dataset = datasetSpec.containerName
else:
jobFileSpec.dataset = datasetSpec.datasetName
if self.type in datasetSpec.getInputTypes() or setType in datasetSpec.getInputTypes():
# prodDBlock
jobFileSpec.prodDBlock = datasetSpec.datasetName
# storage token
if not datasetSpec.storageToken in ['',None]:
jobFileSpec.dispatchDBlockToken = datasetSpec.storageToken
else:
# destinationDBlock
jobFileSpec.destinationDBlock = datasetSpec.datasetName
# storage token
if not datasetSpec.storageToken in ['',None]:
jobFileSpec.destinationDBlockToken = datasetSpec.storageToken.split('/')[0]
# destination
if not datasetSpec.destination in ['',None]:
jobFileSpec.destinationSE = datasetSpec.destination
# set prodDBlockToken for Event Service
if useEventService and datasetSpec.getObjectStore() != None:
jobFileSpec.prodDBlockToken = 'objectstore^{0}'.format(datasetSpec.getObjectStore())
# allow no output
if datasetSpec.isAllowedNoOutput():
jobFileSpec.allowNoOutput()
# return
return jobFileSpec