Exemplo n.º 1
0
 def __init__(self,MainDaemon):
     ModuleTemplate.__init__(self,MainDaemon)
     #config variables init
     self.LOG_DB = self.getConfigVar("LOG_DB")
     self.LOG_DB = self.LOG_DB.replace("~~HOME~~", appendProjectPath())
     
     self.LOG_RESOLUTION = int(self.getConfigVar("LOG_RESOLUTION"))
     
     self.engine = create_engine(self.LOG_DB)
     
     self.InitDB()
     return
Exemplo n.º 2
0
 def stop(self):
     ''' Called to request the thread to terminate
     Clears the socket
     '''
     returnValue =ModuleTemplate.stop(self)
     #Free the socket, otherwise complains that its in use
     self.serverSocket.close()
     return returnValue
Exemplo n.º 3
0
 def __init__(self,MainDaemon):
     ModuleTemplate.__init__(self,MainDaemon)
     self.WAIT_TIME = self.getConfigVar("WAIT_TIME")
     self.MAX_START_ATTEPMTS = self.getConfigVar("MAX_START_ATTEPMTS")
     
     self.setEnabled(False)
     
     #Add variable to all server Nodes
     for server in self.mainDaemon.servers.getSortedNodeList():
         
         server.desiredOpState=ServerNodeOpState.OK
     
     #Communication commands
     self.mainDaemon.communicationHandler.AddCommandToList("getAutoControlStatus",
                                                           lambda dataDict: self.getAutoControlStatus())
     self.mainDaemon.communicationHandler.AddCommandToList("setAutoControlStatus",
                                                           lambda dataDict: self.setAutoControlStatusCommand(dataDict["state"]))
     self.mainDaemon.communicationHandler.AddCommandToList("switchNetwork",lambda dataDict: self.switchNetworkCommand(dataDict["state"]))
     
     self.workers = workerEngine()
     self.communicationWorker = workerEngine()
     return
Exemplo n.º 4
0
 def __init__(self, MainDaemon):
     ModuleTemplate.__init__(self, MainDaemon)
     return
Exemplo n.º 5
0
 def __init__(self,MainDaemon):
     ModuleTemplate.__init__(self,MainDaemon)
     self.LISTENER_PORT = self.getConfigInt('LISTENER_PORT')
     self.MAX_CONNECTIONS = self.getConfigInt('MAX_CONNECTIONS')
     self.MAX_RCV_SIZE = self.getConfigInt('MAX_RCV_SIZE')
     return
Exemplo n.º 6
0
 def __init__(self, MainDaemon):
     ModuleTemplate.__init__(self, MainDaemon)
     self.wait_time = self.getConfigInt("WAIT_TIME")
 def __init__(self,MainDaemon):
     ModuleTemplate.__init__(self,MainDaemon)
     
     self.updateWorkers = workerEngine()
     return