本文整理汇总了Python中DIRAC.Interfaces.API.Job.Job._getParameters方法的典型用法代码示例。如果您正苦于以下问题:Python Job._getParameters方法的具体用法?Python Job._getParameters怎么用?Python Job._getParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.Job.Job
的用法示例。
在下文中一共展示了Job._getParameters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute
# 需要导入模块: from DIRAC.Interfaces.API.Job import Job [as 别名]
# 或者: from DIRAC.Interfaces.API.Job.Job import _getParameters [as 别名]
def execute(self):
""" Execute it.
"""
jobDescription = self.paramDict['Job']
prodID = self.paramDict['TransformationID']
jobID = self.paramDict['TaskID']
inputData = self.paramDict['InputData']
job = Job(jobDescription)
commons = job._getParameters() #pylint: disable=protected-access
code = job.workflow.createCode()
outputList = []
for line in code.split("\n"):
if line.count("listoutput"):
outputList += eval(line.split("#")[0].split("=")[-1]) #pylint: disable=eval-used
commons['outputList'] = outputList
commons['PRODUCTION_ID'] = prodID
commons['JOB_ID'] = jobID
if inputData:
commons['InputData'] = inputData
result = constructProductionLFNs(commons)
if not result['OK']:
LOG.error(result['Message'])
return result
if commons['JobType'] in ILDJOBTYPES and commons['InputData']:
for index, outputFile in enumerate( result['Value']['ProductionOutputData'] ):
outputFileILD = getProdFilenameFromInput( commons['InputData'], outputFile, prodID, jobID )
result['Value']['ProductionOutputData'][index] = outputFileILD
LOG.debug("Changed output file name from '%s' to '%s' " % (outputFile, outputFileILD))
return result
示例2: execute
# 需要导入模块: from DIRAC.Interfaces.API.Job import Job [as 别名]
# 或者: from DIRAC.Interfaces.API.Job.Job import _getParameters [as 别名]
def execute(self):
""" Execute it.
"""
jobDescription = self.paramDict['Job']
prodID = self.paramDict['TransformationID']
jobID = self.paramDict['TaskID']
inputData = self.paramDict['InputData']
job = Job(jobDescription)
commons = job._getParameters()
code = job.workflow.createCode()
outputList = []
for line in code.split("\n"):
if line.count("listoutput"):
outputList += eval(line.split("#")[0].split("=")[-1])
commons['outputList'] = outputList
commons['PRODUCTION_ID'] = prodID
commons['JOB_ID'] = jobID
if inputData:
commons['InputData'] = inputData
gLogger.debug(commons)
result = constructProductionLFNs(commons)
if not result['OK']:
gLogger.error(result['Message'])
return result