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

Method _journal_data

openkb/mutation.py:144–160  ·  view source on GitHub ↗
(self, status: str)

Source from the content-addressed store, hash-verified

142 hardlinked_dirs: set[Path] = field(default_factory=set)
143
144 def _journal_data(self, status: str) -> dict:
145 return {
146 "version": 1,
147 "operation": self.operation,
148 "status": status,
149 "kb_dir": str(self.kb_dir),
150 "backup_dir": str(self.backup_dir),
151 "details": self.details,
152 "attempts": self.attempts,
153 "entries": [
154 {
155 "target": str(target),
156 "backup": str(backup) if backup is not None else None,
157 }
158 for target, backup in self.entries.items()
159 ],
160 }
161
162 def write_journal(self, status: str) -> None:
163 self.journal_path.parent.mkdir(parents=True, exist_ok=True)

Callers 1

write_journalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected