def get_configured_protocol(self): try: class_name = get_setting('MARA_CLIENT_PROTOCOL', 'protocols.mara.client.protocol.MaraClientProtocol') class_ = import_class(class_name) except ImportError: class_ = MaraClientProtocol return class_
def get_handler_classes(self): '''Returns a list of handler classess based on configuration''' configured_handlers = get_setting('POLL_FRAME_HANDLERS', []) if not configured_handlers: logger.warn("No frame handlers. Porbably no frame will be saved on DB!!!") classes = [] for handler_class_name in configured_handlers: handler_class = import_class(handler_class_name) classes.append(handler_class) return classes
def get_handler_classes(self): '''Returns a list of handler classess based on configuration''' configured_handlers = get_setting('POLL_FRAME_HANDLERS', []) if not configured_handlers: logger.warn( "No frame handlers. Porbably no frame will be saved on DB!!!") classes = [] for handler_class_name in configured_handlers: handler_class = import_class(handler_class_name) classes.append(handler_class) return classes
def get_configured_construct(self): """ Takes from configuration the path to the ConsturctClass """ class_ = import_class(get_setting('MARA_CONSTRUCT')) return class_