def __init__(self): BaseLoggingObj.__init__(self) self.bichondao = BichonDao() try: self.initAllServer() except Exception, e: self.logging.error("brokers init false!")
def __init__(self): self.dao = BichonDao() self.taskScheduler = TimeScheduler() servers = self.dao.selectServer() for server in servers: service = self.dao.selectService(server.id) Supervise.hostServicesMap.setdefault(server.host, service) self.initScheduler()
def __init__(self): self.dao = BichonDao()
path = request.values.get("path") data=fileService.readFile(host,path) return jsonify(data=data, error=False, msg="") @app.route("/updateConfig",methods=['GET', 'POST']) def updateConfig(): host = request.values.get("host") data = request.values.get("data") path = request.values.get("path") data=fileService.overwriteFile(host,path,data) return jsonify(data=data, error=False, msg="") if __name__ == '__main__': dao = BichonDao() cpu = CpuService() mem = MemService() disk = FileSystemService() process = ProcessService() check = CheckService() net = NetService() iptable=IptableService() execService=ExecService() fileService=FileService() taskHelper = TaskHelper() app.run(debug=True)