MCPcopy
hub / github.com/coderamp-labs/gitingest / _cleanup_repository

Function _cleanup_repository

src/server/query_processor.py:35–43  ·  view source on GitHub ↗

Clean up the cloned repository after processing.

(clone_config: CloneConfig)

Source from the content-addressed store, hash-verified

33
34
35def _cleanup_repository(clone_config: CloneConfig) -> None:
36 """Clean up the cloned repository after processing."""
37 try:
38 local_path = Path(clone_config.local_path)
39 if local_path.exists():
40 shutil.rmtree(local_path)
41 logger.info("Successfully cleaned up repository", extra={"local_path": str(local_path)})
42 except (PermissionError, OSError):
43 logger.exception("Could not delete repository", extra={"local_path": str(clone_config.local_path)})
44
45
46async def _check_s3_cache(

Callers 1

process_queryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected