def action_JAP_UPDATE(self, request): data = request.args["data"][0] decoder = JAP_LOCAL.JSONDecoder() configuration = decoder.decode(data) JAP_LOCAL.setConfiguration("./JAP.json", configuration, getDefaultConfiguration) logger = logging.getLogger("JAP") if configuration["LOGGER"]["LEVEL"] == "DEBUG": logger.setLevel(logging.DEBUG) elif configuration["LOGGER"]["LEVEL"] == "INFO": logger.setLevel(logging.INFO) elif configuration["LOGGER"]["LEVEL"] == "WARNING": logger.setLevel(logging.WARNING) elif configuration["LOGGER"]["LEVEL"] == "ERROR": logger.setLevel(logging.ERROR) elif configuration["LOGGER"]["LEVEL"] == "CRITICAL": logger.setLevel(logging.CRITICAL) else: logger.setLevel(logging.NOTSET) resolver = JAP_LOCAL.createResolver(configuration) reactor.installResolver(resolver) return ""
def action_JAP_REMOTE_WS_UPDATE(self, request): data = request.args["data"][0] decoder = JAP_LOCAL.JSONDecoder() configuration = decoder.decode(data) JAP_LOCAL.setConfiguration("./JAP_REMOTE_WS.json", configuration, JAP_REMOTE_WS.getDefaultConfiguration) return ""