Skip to content

Commit

Permalink
reset the counter after processed commits in branch.
Browse files Browse the repository at this point in the history
Signed-off-by: Chenqi Shan <[email protected]>
  • Loading branch information
shanchenqi committed May 29, 2022
1 parent badd7d5 commit b932e14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grimoire_elk/enriched/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,9 @@ def add_commit_branches(self, git_repo, enrich_backend):

if commit_count:
self.__process_commits_in_branch(enrich_backend, git_repo.uri, branch_name, to_process)

# reset the counter
to_process = []
commit_count = 0
except Exception as e:
logger.error("[git] Skip adding branch info for repo {} due to {}".format(git_repo.uri, e))
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: 'reset the counter after processed commits in branch '
category: fixed
author: ChenqiShan <[email protected]>
issue:
notes: >
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 comments on commit b932e14

Please sign in to comment.