def stopService(self): """ Stop the database service, closing all open indices. """ Plugin.stopService(self) # close the DB environment self._env.close() logger.debug("[%s] closed database environment" % self.name)
def stopService(self): """ Stop the database service, closing all open indices. """ Plugin.stopService(self) # close the DB environment self._env.close() self._logfd.stopReading() self._logfd = None logger.debug("[%s] closed database environment" % self.name)
def startService(self): Plugin.startService(self) if not self._inputs == []: portal = Portal(CollectorRealm(self)) portal.registerChecker(AllowAnonymousAccess()) factory = PBServerFactory(portal) self._listener = reactor.listenTCP(self._port, factory, interface=self._address) logger.info("[%s] listening for remote messages on %s:%i" % (self.name,self._address,self._port)) else: logger.info("[%s] no inputs configured" % self.name)
def startService(self): """ Start the database service. """ # start processing logfd messages self._logfd = LogFD() self._logfd.startReading() # open the db environment self._env = Env(self._dbdir, self._options) logger.debug("[%s] opened database environment in %s" % (self.name,self._dbdir)) Plugin.startService(self)
def startService(self): Plugin.startService(self) if not self._inputs == []: portal = Portal(CollectorRealm(self)) portal.registerChecker(AllowAnonymousAccess()) factory = PBServerFactory(portal) self._listener = reactor.listenTCP(self._port, factory, interface=self._address) logger.info("[%s] listening for remote messages on %s:%i" % (self.name, self._address, self._port)) else: logger.info("[%s] no inputs configured" % self.name)
def __init__(self): Plugin.__init__(self) self._env = None self._outputs = {}
def stopService(self): if not self._listener == None: self._listener.stopListening() self._listener = None Plugin.stopService(self) logger.info("[%s] stopped listening for remote messages" % self.name)