本文整理汇总了Python中EDJob.EDJob.connectCallBack方法的典型用法代码示例。如果您正苦于以下问题:Python EDJob.connectCallBack方法的具体用法?Python EDJob.connectCallBack怎么用?Python EDJob.connectCallBack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDJob.EDJob
的用法示例。
在下文中一共展示了EDJob.connectCallBack方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: unitTestExecuteCallback
# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import connectCallBack [as 别名]
def unitTestExecuteCallback(self):
"""
check the execution of a job (without callback)
"""
EDVerbose.DEBUG("EDTestCaseEDJob.unitTestExecuteCallback")
edJob = EDJob(self.strPluginName)
edJob.connectCallBack(self.callBack)
edJob.setDataInput(self.strXmlInput)
strJobId = edJob.execute()
strStatus = edJob.getStatus()
EDVerbose.DEBUG("Job %s in State ''%s''" % (strJobId, strStatus))
示例2: start
# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import connectCallBack [as 别名]
def start(self, _strXmlInput):
"""
Launch EDNA with the given XML stream
@param _strXmlInput: XML to be passed to the plugin
@type _strXmlInput: python string representing the XML data structure
"""
jobid = None
if _strXmlInput not in ["", None]:
job = EDJob(self.__strPluginName)
job.setDataInput(_strXmlInput)
job.connectFAILURE(self.failureJobExecution)
job.connectSUCCESS(self.successJobExecution)
job.connectCallBack(self.unregisterJob)
self.semaphoreNbThreadsAcquire()
jobid = job.execute()
self.DEBUG("Running Job id %s" % jobid)
if jobid is None:
self.semaphoreNbThreadsRelease()
return jobid