MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / upsert

Method upsert

scripts/fetch_updates.py:433–438  ·  view source on GitHub ↗
(self, doc_id: str, current: dict)

Source from the content-addressed store, hash-verified

431 return self.data["documents"].get(doc_id)
432
433 def upsert(self, doc_id: str, current: dict):
434 existing = self.data["documents"].get(doc_id, {})
435 history = existing.get("history", [])
436 if existing.get("current"):
437 history.append(existing["current"])
438 self.data["documents"][doc_id] = {"current": current, "history": history}
439
440 def find_outdated(self, days: int = 180) -> list:
441 cutoff = datetime.now() - timedelta(days=days)

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected