MCPcopy Create free account
hub / github.com/FinStep-AI/ContestTrade / periodic_status_check

Function periodic_status_check

cli/main.py:497–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

495
496 # 启动定期检查文件状态的任务
497 async def periodic_status_check():
498 while not display.analysis_completed:
499 display.check_agent_status_from_events_and_files(trigger_time)
500
501 # 检查控制台大小是否变化,如果变化则重新创建布局
502 if display.console_size_changed():
503 new_layout = display.create_layout(trigger_time)
504 # 将新布局的内容复制到当前布局中
505 layout.update(new_layout)
506 display.update_display(layout, trigger_time)
507 else:
508 display.update_display(layout, trigger_time)
509
510 await asyncio.sleep(1) # 每1秒检查一次,提高响应性
511
512 # 启动状态检查任务
513 status_check_task = asyncio.create_task(periodic_status_check())

Callers 1

run_with_events_captureFunction · 0.85

Calls 4

console_size_changedMethod · 0.80
create_layoutMethod · 0.80
update_displayMethod · 0.80

Tested by

no test coverage detected