예제 #1
0
 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
0
파일: EDTestCaseEDJob.py 프로젝트: kif/edna
 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))
예제 #3
0
 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
예제 #4
0
 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