Skip to content

Commit b932e14

Browse files
committed
reset the counter after processed commits in branch.
Signed-off-by: Chenqi Shan <[email protected]>
1 parent badd7d5 commit b932e14

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

grimoire_elk/enriched/git.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,9 @@ def add_commit_branches(self, git_repo, enrich_backend):
10361036

10371037
if commit_count:
10381038
self.__process_commits_in_branch(enrich_backend, git_repo.uri, branch_name, to_process)
1039-
1039+
# reset the counter
1040+
to_process = []
1041+
commit_count = 0
10401042
except Exception as e:
10411043
logger.error("[git] Skip adding branch info for repo {} due to {}".format(git_repo.uri, e))
10421044
return
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
title: 'reset the counter after processed commits in branch '
2+
category: fixed
3+
author: ChenqiShan <[email protected]>
4+
issue:
5+
notes: >
6+
During the study enrich_git_branches, we reset the counter only after if commit_count == MAX_BULK_UPDATE_SIZE:.We should also reset the counter after if commit_count: by the same way.Otherwise, to_process list will be added to next for Loop when branched has been added by "if commit_count:".

0 commit comments

Comments
 (0)