MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / discard

Method discard

openkb/mutation.py:242–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240 return None
241
242 def discard(self) -> None:
243 # Best-effort post-commit/post-rollback cleanup: callers have already
244 # written a terminal status (mark_committed or rollback), so there is
245 # nothing to re-write here — doing so would be dead work and would
246 # silently downgrade a "rolled_back" journal to "committed" moments
247 # before it is deleted.
248 shutil.rmtree(self.backup_dir, ignore_errors=True)
249 self.journal_path.unlink(missing_ok=True)
250
251 def discard_best_effort(self) -> Exception | None:
252 try:

Callers 2

discard_best_effortMethod · 0.95
recover_pending_journalsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected