perf: Improve chart rendering wait logic in export process

pull/15936/head
wangruidong 2025-08-26 16:16:46 +08:00 committed by 老广
parent af7a00c1b1
commit 1350b774b3
1 changed files with 1 additions and 3 deletions

View File

@ -95,9 +95,7 @@ def export_chart_to_pdf(chart_name, sessionid, request=None):
page = context.new_page()
try:
page.goto(url, wait_until='networkidle')
page.wait_for_selector('.charts-zone', timeout=10000)
# 等待渲染完成
page.wait_for_timeout(2000)
page.wait_for_function('window.echartsFinished === true', timeout=10000)
page_title = page.title()
print(f"Page title: {page_title}")