本文整理汇总了Python中pandatools.Client.insertTaskParams方法的典型用法代码示例。如果您正苦于以下问题:Python Client.insertTaskParams方法的具体用法?Python Client.insertTaskParams怎么用?Python Client.insertTaskParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandatools.Client
的用法示例。
在下文中一共展示了Client.insertTaskParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: master_submit
# 需要导入模块: from pandatools import Client [as 别名]
# 或者: from pandatools.Client import insertTaskParams [as 别名]
def master_submit(self,rjobs,subjobspecs,buildjobspec):
'''Submit jobs'''
from pandatools import Client
from pandatools import MiscUtils
from Ganga.Core import IncompleteJobSubmissionError
from Ganga.Utility.logging import log_user_exception
job = self.getJobObject()
# job name
jobName = 'ganga.%s' % MiscUtils.wrappedUuidGen()
jobspecs = {}
if buildjobspec:
jobspecs = buildjobspec
else:
jobspecs = subjobspecs
logger.debug(jobspecs)
# submit task
for subjob in rjobs:
subjob.updateStatus('submitting')
logger.info("Submitting to Jedi ...")
verbose = logger.isEnabledFor(10)
with inject_proxy(self.credential_requirements):
status, tmpOut = Client.insertTaskParams(jobspecs, verbose)
logger.debug(tmpOut)
if status != 0:
logger.error("Task submission to Jedi failed with %s " %status)
return False
if tmpOut[0] == False:
logger.error("Task submission to Jedi failed %s" %tmpOut[1])
return False
logger.info("Task submission to Jedi suceeded with new jediTaskID=%s" %tmpOut[1])
#if buildjobspec:
# job.backend.buildjob = PandaBuildJob()
# job.backend.buildjob.id = jobids[0][0]
# job.backend.buildjob.url = 'http://panda.cern.ch/?job=%d'%jobids[0][0]
# del jobids[0]
for subjob in rjobs:
subjob.backend.id = tmpOut[1]
subjob.backend.url = 'http://pandamon.cern.ch/jedi/taskinfo?days=20&task=%d'%tmpOut[1]
subjob.updateStatus('submitted')
logger.info("Panda monitor url: %s" %subjob.backend.url)
return True