Skip to content

Commit

Permalink
comment about extra reclones
Browse files Browse the repository at this point in the history
  • Loading branch information
fajpunk committed Feb 18, 2025
1 parent 1652475 commit 6225027
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mobu/services/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ async def invalidate(self, url: str, ref: str, repo_hash: str) -> None:
info = self._cache.get(key)
if info:
logger.info("Invalidating repo")

# Note that this could force an unnecessary clone if any monkey
# is calling invalidate in its shutdown method. This would
# force reclone for other monkeys that are using the same repo
# at the same hash.
del self._cache[key]

count = self._references.get(reference)
Expand Down

0 comments on commit 6225027

Please sign in to comment.