MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / create_flush_callback

Function create_flush_callback

run_ui.py:52–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def create_flush_callback():
53 def flush_and_shutdown_callback() -> None:
54 """
55 TODO(dev): add cleanup + flush-to-disk logic here.
56 """
57 return
58
59 flush_ran = False
60
61 def _run_flush(reason: str) -> None:
62 nonlocal flush_ran
63 if flush_ran:
64 return
65 flush_ran = True
66 try:
67 flush_and_shutdown_callback()
68 except Exception as e:
69 PrintStyle.warning(f"Shutdown flush failed ({reason}): {e}")
70
71 return _run_flush
72
73
74@extension.extensible

Callers 1

start_web_serverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected