Skip to content

Commit e699932

Browse files
Removed magic number with constant
Signed-off-by: PredictiveManish <[email protected]>
1 parent 7d975f3 commit e699932

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

augur/tasks/github/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from sqlalchemy.sql import text
1515

1616
platform_id = 1
17-
17+
MESSAGE_BATCH_SIZE = 200
1818
@celery.task(base=AugurCoreRepoCollectionTask)
1919
def collect_github_messages(repo_git: str, full_collection: bool) -> None:
2020

@@ -137,7 +137,7 @@ def process_large_issue_and_pr_message_collection(repo_id, repo_git: str, logger
137137
logger.info(f"{task_name}: PR or issue comment url of {comment_url} returned 404. Skipping.")
138138
skipped_urls += 1
139139

140-
if len(all_data) >= 200:
140+
if len(all_data) >= MESSAGE_BATCH_SIZE:
141141
process_messages(all_data, task_name, repo_id, logger, augur_db, issue_url_to_id_map, pr_issue_url_to_id_map)
142142
all_data.clear()
143143

0 commit comments

Comments
 (0)