def printTask(self): self.runSendMail = self.checkRunSendMail() if(self.runSendMail == 1): self.cThread = self.manageThread(); if(self.cThread is not None): log.info("Start current Thread %s" %self.cThread.getName()) self.cThread.showThread() else: tgscheduler.stop_scheduler() log.info("Server : %s(%s) is not permission run send mail" %s(self.sysServer.server_name, self.sysServer.ip_server))
def bootstrap(command, conf, vars): """Place any commands to setup outages here""" #Kill the scheduler tgscheduler.stop_scheduler() root_node = LocationNode(id=0, name="RootNode", location_level="ROOTNODE") DBSession.add(root_node) DBSession.flush() transaction.commit()
def printTask(self): self.runSendMail = self.checkRunSendMail() if(self.runSendMail == 1): self.SMTP = self.checkSMTPServer() self.cThread = self.manageThread(smtps = self.SMTP) if(self.cThread is not None): #log.info("Start current Thread %s" %self.cThread.getName()) self.cThread.setSMTPs(smtps = self.SMTP) self.cThread.showThread() else: tgscheduler.stop_scheduler()
def tearDown(self): stop_scheduler()