Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)
Esempio n. 7
0
 def __init__(self):
     Plugin.__init__(self)
     self._env = None
     self._outputs = {}
Esempio n. 8
0
 def __init__(self):
     Plugin.__init__(self)
     self._env = None
     self._outputs = {}
Esempio n. 9
0
 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)
Esempio n. 10
0
 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)