コード例 #1
0
ファイル: EDPlugin.py プロジェクト: olofsvensson/edna-kernel
 def tellFinished(self, _edObject=None):
     """
     Tell EDStatus that the plugin has finished, either in success either in error 
     """
     if self.isFailure():
         EDStatus.tellFailure(self.__strPluginId)
     else:
         EDStatus.tellSuccess(self.__strPluginId)
コード例 #2
0
ファイル: EDPlugin.py プロジェクト: yayahjb/edna-mx
 def tellFinished(self, _edObject=None):
     """
     Tell EDStatus that the plugin has finished, either in success either in error 
     """
     if self.isFailure():
         EDStatus.tellFailure(self.__strPluginId)
     else:
         EDStatus.tellSuccess(self.__strPluginId)
コード例 #3
0
 def join(self):
     """
     wait for all jobs to finish
     """
     while not (self.jobQueue.empty() and \
             (self.__semaphoreNbThreads._Semaphore__value == self.iNbCpu) and \
             (EDUtilsParallel.getNbRunning() == 0) and \
             (self.processingSem._Semaphore__value == 1) and\
             (len(EDStatus.getRunning()) == 0)):
         time.sleep(1)
コード例 #4
0
ファイル: EDTestCaseEDStatus.py プロジェクト: rentreg/edna
 def unitTestFailed(self):
     """
     check the failure of a plugin is registerd 
     """
     EDVerbose.DEBUG("EDTestCaseEDStatus.unitTestFailed")
     EDStatus.tellFailure(self.strPluginName)
     EDVerbose.DEBUG("Success Plugins: " + ",".join(EDStatus.getSuccess()))
     EDVerbose.DEBUG("Running Plugins: " + ",".join(EDStatus.getRunning()))
     EDVerbose.DEBUG("Failed Plugins: " + ",".join(EDStatus.getFailure()))
     EDAssert.equal(False, self.strPluginName in EDStatus.getRunning(), "Plugin not yet running")
     EDAssert.equal(False, self.strPluginName in EDStatus.getSuccess(), "Plugin not yet Finished")
     EDAssert.equal(True, self.strPluginName in EDStatus.getFailure(), "Plugin Failed as expected")
コード例 #5
0
ファイル: EDTestCaseEDStatus.py プロジェクト: rentreg/edna
 def unitTestRunning(self):
     """
     check the status after a job creation
     """
     EDVerbose.DEBUG("EDTestCaseEDStatus.unitTestRunning")
     EDStatus.tellRunning(self.strPluginName)
     EDVerbose.DEBUG("Success Plugins: " + ",".join(EDStatus.getSuccess()))
     EDVerbose.DEBUG("Running Plugins: " + ",".join(EDStatus.getRunning()))
     EDVerbose.DEBUG("Failed Plugins: " + ",".join(EDStatus.getFailure()))
     EDAssert.equal(True, self.strPluginName in EDStatus.getRunning(), "Plugin  running")
     EDAssert.equal(False, self.strPluginName in EDStatus.getSuccess(), "Plugin not yet Finished")
     EDAssert.equal(False, self.strPluginName in EDStatus.getFailure(), "Plugin not yet Finished")
コード例 #6
0
ファイル: EDPlugin.py プロジェクト: olofsvensson/edna-kernel
 def preProcess(self, _edObject=None):
     """
     Writes xml data input in the working dir (if required)
     Connects a slot for generating the executive summary after the plugin execution
     Connects a slot for checking output data to the finally process
     Initialize the base directory
     Configures the plugin
     Checks the input data
     """
     EDAction.preProcess(self, _edObject)
     self.DEBUG("EDPlugin.preProcess")
     self.connectPostProcess(self.exportDataOutput)
     if self.__bWriteDataXMLInputOutput:
         if self.__bWriteDataXMLInput:
             self.connectPreProcess(self.writeDataInput)
     self.connectPostProcess(self.generateExecutiveSummary)
     self.connectFinallyProcess(self.checkDataOutput)
     if (self.__strBaseName is None):
         self.setBaseName(self.createBaseName())
     EDStatus.tellRunning(self.__strPluginId)
     self.connectFinallyProcess(self.tellFinished)
     self.checkParameters()
コード例 #7
0
ファイル: EDPlugin.py プロジェクト: yayahjb/edna-mx
 def preProcess(self, _edObject=None):
     """
     Writes xml data input in the working dir (if required)
     Connects a slot for generating the executive summary after the plugin execution
     Connects a slot for checking output data to the finally process
     Initialize the base directory
     Configures the plugin
     Checks the input data
     """
     EDAction.preProcess(self, _edObject)
     self.DEBUG("EDPlugin.preProcess")
     self.connectPostProcess(self.exportDataOutput)
     if self.__bWriteDataXMLInputOutput:
         if self.__bWriteDataXMLInput:
             self.connectPreProcess(self.writeDataInput)
     self.connectPostProcess(self.generateExecutiveSummary)
     self.connectFinallyProcess(self.checkDataOutput)
     if (self.__strBaseName is None):
         self.setBaseName(self.createBaseName())
     EDStatus.tellRunning(self.__strPluginId)
     self.connectFinallyProcess(self.tellFinished)
     self.checkParameters()
コード例 #8
0
 def getFailure(self):
     """
     retrieve the list of plugins finished with failure (with their plugin-Id)
     """
     return EDStatus.getFailure()
コード例 #9
0
 def getSuccess(self):
     """
     retrieve the list of plugins finished with success (with their plugin-Id)
     """
     return EDStatus.getSuccess()
コード例 #10
0
 def getRunning(self):
     """
     retrieve the list of plugins currently under execution (with their plugin-Id)
     """
     return EDStatus.getRunning()