You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by rb...@apache.org on 2026/09/18 17:16:28 UTC

(comdev-metrics) branch main updated: Fix leftover docstring fragment from cache refactor

This is an automated email from the ASF dual-hosted git repository.

rbowen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/comdev-metrics.git


The following commit(s) were added to refs/heads/main by this push:
     new 0d21ed5  Fix leftover docstring fragment from cache refactor
0d21ed5 is described below

commit 0d21ed5e07c364c05e14458ee6b9686cc39b97ef
Author: Rich Bowen <rb...@rcbowen.com>
AuthorDate: Fri Sep 18 13:16:16 2026 -0400

    Fix leftover docstring fragment from cache refactor
    
    The regex removal of _cache_is_current() in git_activity.py left
    behind the function's docstring body and implementation lines,
    causing a SyntaxError. Remove the orphaned lines.
    
    Part of #2
---
 src/asfmetrics/collectors/git_activity.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/asfmetrics/collectors/git_activity.py b/src/asfmetrics/collectors/git_activity.py
index ff05d67..ae97771 100644
--- a/src/asfmetrics/collectors/git_activity.py
+++ b/src/asfmetrics/collectors/git_activity.py
@@ -144,14 +144,6 @@ def _first_of_month(month_str: str) -> datetime:
 
 
 
-    Returns True only if fetched today (same date). For a weekly cron,
-    this means each run will refresh the current month's data, but
-    running multiple times in one day won't hit the API repeatedly.
-    """
-    fetched_at = cache.get("_fetched_at", "")
-    today = datetime.now().strftime("%Y-%m-%d")
-    return fetched_at == today
-
 
 def invalidate_git_cache(config: dict) -> None:
     """Remove all git activity cache files."""