chore: add logging to upload_chart_svg to debug silent failure

This commit is contained in:
fujie
2026-02-11 13:49:08 +08:00
parent a05697df70
commit d71b4a7351

View File

@@ -1189,11 +1189,17 @@ class OpenWebUIStats:
def upload_chart_svg(self):
"""生成 Vega-Lite SVG 并上传到 Gist (作为独立文件)"""
print("🚀 Starting chart SVG generation process...")
if not (self.gist_token and self.gist_id):
print("⚠️ Skipping chart upload: GIST_TOKEN or GIST_ID missing")
return
history = self.load_history()
print(f"📊 History records loaded: {len(history)}")
if len(history) < 3:
print("⚠️ Skipping chart upload: not enough history (<3 records)")
return
# 准备数据点