MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / _load_migration_state

Method _load_migration_state

scripts/legacy-migrator.py:376–392  ·  view source on GitHub ↗

Load previous migration state if exists.

(self)

Source from the content-addressed store, hash-verified

374 return False
375
376 def _load_migration_state(self):
377 """Load previous migration state if exists."""
378 if self.migration_log.exists():
379 try:
380 with open(self.migration_log, "r") as f:
381 state_data = json.load(f)
382
383 # Update step completion status
384 completed_steps = state_data.get("completed_steps", [])
385 for step in self.steps:
386 if step.name in completed_steps:
387 step.completed = True
388
389 print(f"[INFO] Loaded previous migration state: {len(completed_steps)} steps completed")
390
391 except Exception as e:
392 print(f"[WARN] Could not load migration state: {e}")
393
394 def _save_migration_state(self):
395 """Save current migration state."""

Callers 1

run_migrationMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected