def start(self): ServiceNode.start(self) # this will correctly add the msglog as a child # to the logger. if 'msglog' not in self.children_names(): columns = mpx.lib.msglog.get_columns() log = Log() log.configure({'name':'msglog', 'parent':self}) for c in columns: column = mpx.lib.factory('mpx.service.logger.column') config = c.configuration() config['parent'] = log column.configure(config) self._logs = PersistentDataObject(self) self._logs.names = [] self._logs.load() for name in self._logs.names: if ((not mpx.lib.log.log_exists(name)) and (name not in self.children_names())): log = mpx.lib.log.log(name) log.destroy() del(log) self._logs.names = [] for child in self.children_nodes(): if not isinstance(child, Alias): # Don't manage other managers' logs... self._logs.names.append(child.name) self._logs.save()
def start(self): if self.has_child('columns'): _positions = [] columns = [] for child in self.get_child('columns').children_nodes(): if child.position in _positions: raise EConfiguration(('One or more columns ' + 'have the same position')) _positions.append(child.position) column = ColumnConfiguration() column.configure(child.configuration()) columns.append(column) _positions.sort() if _positions != range(0,len(_positions)): raise EConfiguration(( 'Columns do not have consecutive positions this ' 'can be caused by having two columns with the same name.' )) self.log.configure(columns,self.minimum_size,self.maximum_size) else: self.log.set_limits(self.minimum_size,self.maximum_size) self.log.start_trimming() # Turn log trimming on now that sizes are set self.forwarder.start_forwarding(self.log) ServiceNode.start(self) return
def start(self): ServiceNode.start(self) # this will correctly add the msglog as a child # to the logger. if 'msglog' not in self.children_names(): columns = mpx.lib.msglog.get_columns() log = Log() log.configure({'name': 'msglog', 'parent': self}) for c in columns: column = mpx.lib.factory('mpx.service.logger.column') config = c.configuration() config['parent'] = log column.configure(config) self._logs = PersistentDataObject(self) self._logs.names = [] self._logs.load() for name in self._logs.names: if ((not mpx.lib.log.log_exists(name)) and (name not in self.children_names())): log = mpx.lib.log.log(name) log.destroy() del (log) self._logs.names = [] for child in self.children_nodes(): if not isinstance(child, Alias): # Don't manage other managers' logs... self._logs.names.append(child.name) self._logs.save()
def start(self): if not Server._servers.has_key(self.port): Server._servers[self.port] = self self._setup_server() if Server._thread is None: Server._thread = _RedusaThread() Server._thread.start() ServiceNode.start(self)
def start(self): if not Server._servers.has_key(self.port): Server._servers[self.port] = self self._setup_server() if Server._thread is None: Server._thread = _RedusaThread() Server._thread.start() ServiceNode.start(self)
def start(self): if not self.__running: known_alarms = self.get_child('alarms') for child in known_alarms.children_nodes(): child.event_subscribe(self, AlarmTriggerEvent) child.event_subscribe(self, AlarmClearEvent) self.__running = 1 self.__thread = ImmortalThread(name=self.name,target=self.__run) self.__thread.start() ServiceNode.start(self) return
def start(self): if not self.__running: known_alarms = self.get_child('alarms') for child in known_alarms.children_nodes(): child.event_subscribe(self, AlarmTriggerEvent) child.event_subscribe(self, AlarmClearEvent) self.__running = 1 self.__thread = ImmortalThread(name=self.name, target=self.__run) self.__thread.start() ServiceNode.start(self) return
def start(self): from mpx.lib.persistent import PersistentDataObject ServiceNode.start(self) if self.debug: print 'Garbage Collector Starting!' self._data = PersistentDataObject(self,dmtype=GC_NEVER) self._data.registered = [] self._data.load() if self.debug: print 'GC Data is %s.' % self._data if self.debug: print 'GC Data._reg is %s.' % self._data.registered
def start(self): for child in self.children_nodes(): if isinstance(child, Formatter): if self.formatter is not None: raise EConfiguration('Can only have one formatter') self.formatter = child elif isinstance(child, Transporter): if self.transporter is not None: raise EConfiguration('Can only have one transporter') self.transporter = child if self.formatter is None or self.transporter is None: raise EConfiguration('Exporter one formatter ' 'and one transporter child') return ServiceNode.start(self)
def start(self): for child in self.children_nodes(): if isinstance(child,Formatter): if self.formatter is not None: raise EConfiguration('Can only have one formatter') self.formatter = child elif isinstance(child,Transporter): if self.transporter is not None: raise EConfiguration('Can only have one transporter') self.transporter = child if self.formatter is None or self.transporter is None: raise EConfiguration('Exporter one formatter ' 'and one transporter child') return ServiceNode.start(self)
def start(self): self._lock.acquire() try: self.log = as_node(self.log) columns_node = self.log.get_child('columns') self.ts_position = columns_node.get_child('timestamp').position # Allow source stamping: if columns_node.has_child('trigger_node_url'): self.trigger_node_url_posn = columns_node.get_child('trigger_node_url').position if columns_node.has_child('trigger_node_msg'): self.trigger_node_msg_posn = columns_node.get_child('trigger_node_msg').position self._started = 1 finally: self._lock.release() self.export_waiting_alarm() return ServiceNode.start(self)
def start(self): self._lock.acquire() try: self.log = as_node(self.log) columns_node = self.log.get_child('columns') self.ts_position = columns_node.get_child('timestamp').position # Allow source stamping: if columns_node.has_child('trigger_node_url'): self.trigger_node_url_posn = columns_node.get_child( 'trigger_node_url').position if columns_node.has_child('trigger_node_msg'): self.trigger_node_msg_posn = columns_node.get_child( 'trigger_node_msg').position self._started = 1 finally: self._lock.release() self.export_waiting_alarm() return ServiceNode.start(self)
def start(self): if self.enabled: self.start_count += 1 self._start() ServiceNode.start(self) return
def start(self): self.tz_change_detector() ServiceNode.start(self)
def start(self): ServiceNode.start(self)
def start(self): return ServiceNode.start(self)
def start(self): self.log = as_node(self.log) ServiceNode.start(self)
def start(self): self.tz_change_detector() ServiceNode.start(self)
def start(self): return ServiceNode.start(self)
def start(self): if self.enabled: self.start_count += 1 self._start() ServiceNode.start(self) return
def start(self): ServiceNode.start(self)
def start(self): self.log = as_node(self.log) ServiceNode.start(self)