Skip to content

Commit

Permalink
forgot to add insert
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
  • Loading branch information
IsaacMilarky committed Aug 31, 2024
1 parent c0ac99a commit 07d4e92
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions augur/tasks/git/facade_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def facade_fetch_missing_commit_messages(repo_git):

missing_message_hashes = get_missing_commit_message_hashes(repo.repo_id)

to_insert = []

for hash in missing_message_hashes:

absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name)
Expand All @@ -188,6 +190,14 @@ def facade_fetch_missing_commit_messages(repo_git):
'data_source' : 'git',
'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
}

if len(to_insert) >= 1000:
bulk_insert_dicts(logger,to_insert, CommitMessage, ["repo_id","cmt_hash"])

to_insert.append(msg_record)

if to_insert:
bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"])


#enable celery multithreading
Expand Down

0 comments on commit 07d4e92

Please sign in to comment.