fix: only update last_checked when cache actually changes
Avoid unnecessary file modifications by only updating last_checked when there are new releases added or old releases deleted. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f4ee14d893
commit
7d17888be8
@ -232,6 +232,8 @@ class ReleaseCacheBuilder:
|
||||
|
||||
if not tags_to_process:
|
||||
logger.debug(f"{repo}: No new releases to process")
|
||||
# Only update last_checked if there were deleted releases
|
||||
if deleted_tags:
|
||||
self.cache.update_repo_checked_time(repo)
|
||||
return {"new_releases": 0, "deleted_releases": len(deleted_tags)}
|
||||
|
||||
@ -263,6 +265,8 @@ class ReleaseCacheBuilder:
|
||||
self.cache.add_release(repo, cached)
|
||||
logger.debug(f"{repo}@{tag}: Parse failed, cached as failed")
|
||||
|
||||
# Only update last_checked if there were actual changes
|
||||
if new_count > 0 or deleted_tags:
|
||||
self.cache.update_repo_checked_time(repo)
|
||||
|
||||
return {"new_releases": new_count, "deleted_releases": len(deleted_tags)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user