MCPcopy Index your code
hub / github.com/SkyworkAI/DeepResearchAgent / _load_data

Method _load_data

src/visualization/visualizer.py:38–54  ·  view source on GitHub ↗

Load data from tracer.json file.

(self)

Source from the content-addressed store, hash-verified

36 self._reload_thread.start()
37
38 def _load_data(self):
39 """Load data from tracer.json file."""
40 if not self.tracer_json_path.exists():
41 print(f"Warning: Tracer JSON file not found: {self.tracer_json_path}")
42 return
43
44 try:
45 with open(self.tracer_json_path, 'r', encoding='utf-8') as f:
46 new_records = json.load(f)
47
48 # Update records with thread lock
49 with self._data_lock:
50 self.records = new_records
51
52 print(f"Data loaded: {len(self.records)} records from {self.tracer_json_path}")
53 except Exception as e:
54 print(f"Error loading data: {e}")
55
56 def _auto_reload_data(self):
57 """Auto-reload data every 60 seconds in background thread."""

Callers 3

__init__Method · 0.95
_auto_reload_dataMethod · 0.95
get_dataMethod · 0.95

Calls 3

printFunction · 0.85
existsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected