debug: 删除上报调试信息

This commit is contained in:
Rock Chin 2023-01-08 16:33:33 +08:00
parent c662e2c4e3
commit 5256d3c718

View File

@ -34,7 +34,7 @@ class DataGatherer:
config = pkg.utils.context.get_config() config = pkg.utils.context.get_config()
if hasattr(config, "report_usage") and not config.report_usage: if hasattr(config, "report_usage") and not config.report_usage:
return return
print("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count)) # print("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count))
res = requests.get("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count)) res = requests.get("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count))
if res.status_code != 200 or res.text != "ok": if res.status_code != 200 or res.text != "ok":
logging.warning("report to server failed, status_code: {}, text: {}".format(res.status_code, res.text)) logging.warning("report to server failed, status_code: {}, text: {}".format(res.status_code, res.text))