def configure(self, config): set_attribute(self,'timeout',60,config,int) set_attribute(self,'connection_node','/services/network',config) set_attribute(self,'connection_attempts',3,config,int) set_attribute(self,'log_path','../..',config, self.as_node_url) Exporter.configure(self, config)
def start(self): Exporter.start(self) if not self.running: self.log = self.as_node(self.log_path) self.running = 1 self.connection = as_node(self.connection_node) self._seq_stati = self.SequenceStati(self) self._seq_stati.load() self.log.event_subscribe(self, LogAddEntryEvent) else: raise EAlreadyRunning
def configuration(self): config = Exporter.configuration(self) get_attribute(self,'connection_node',config) get_attribute(self,'connection_attempts',config) get_attribute(self,'timeout',config,int) get_attribute(self,'log_path',config,self.as_node_url) return config
def configuration(self): config = Exporter.configuration(self) get_attribute(self, 'connection_node', config) get_attribute(self, 'connection_attempts', config) get_attribute(self, 'timeout', config, int) get_attribute(self, 'log_path', config, self.as_node_url) return config
def __init__(self): self.running = 0 self.log = None Exporter.__init__(self) EventConsumerMixin.__init__(self,self.handle_entry,self.handle_error)
def configure(self, config): set_attribute(self, 'timeout', 60, config, int) set_attribute(self, 'connection_node', '/services/network', config) set_attribute(self, 'connection_attempts', 3, config, int) set_attribute(self, 'log_path', '../..', config, self.as_node_url) Exporter.configure(self, config)
def __init__(self): self.running = 0 self.log = None Exporter.__init__(self) EventConsumerMixin.__init__(self, self.handle_entry, self.handle_error)