4 HCE project, Python bindings, Distributed Tasks Manager application. 5 PostprocessorTask class derived from cement application and has main functional for postprocessing. 7 @package: dc_postprocessor 8 @file PostprocessorTask.py 9 @author Alexander Vybornyh <alexander.hce.cluster@gmail.com> 10 @link: http://hierarchical-cluster-engine.com/ 11 @copyright: Copyright © 2013-2017 IOIX Ukraine 12 @license: http://hierarchical-cluster-engine.com/license/ 26 CONFIG_OPTION_MODULES_IMPORT =
'modulesImport' 27 CONFIG_OPTION_MODULES_ORDER =
'modulesOrder' 29 PACKAGE_MAME =
'dc_postprocessor' 32 ERROR_MSG_LOAD_CONFIG_OPTIONS =
"Error load config options. Error: %s" 33 ERROR_MSG_INSTANTIATE_MODULES =
"Error instantiate modules. Error: %s" 36 MSG_PROCESSING_STARTED =
"Postprocessing for batch ID = %s started." 37 MSG_PROCESSING_FINISHED =
"Postprocessing for batch ID = %s finished." 41 label = APP_CONSTS.POST_PROCESSOR_APP_NAME
48 PostProcessingApplicationClass.__init__(self)
71 PostProcessingApplicationClass.setup(self)
79 PostProcessingApplicationClass.run(self)
85 self.
logger.info(APP_CONSTS.LOGGER_DELIMITER_LINE)
103 im = importlib.import_module(self.
PACKAGE_MAME +
'.' + m)
107 except Exception, err:
148 except Exception, err:
161 for moduleInstance
in self.
modules:
163 if moduleName
in str(
type(moduleInstance)):
167 for i
in xrange(len(self.
batch.items)):
169 for moduleInstance
in self.
modules:
171 if moduleName
in str(
type(moduleInstance)):
172 self.
batch.items[i] = moduleInstance.processBatchItem(self.
batch.items[i])
string ERROR_MSG_LOAD_CONFIG_OPTIONS
string MSG_PROCESSING_STARTED
string CONFIG_OPTION_MODULES_IMPORT
string CONFIG_OPTION_MODULES_ORDER
string MSG_PROCESSING_FINISHED
def getConfigOption(self, sectionName, optionName, defaultValue=None)
def instantiateModules(self)
string ERROR_MSG_INSTANTIATE_MODULES