Skip to content

Commit b74bf96

Browse files
committed
Use a single process for mining commits in the HTTP service
Since we need to mine only a few commits per call, it doesn't make sense to pay the overhead of starting many threads and processes. This should help with #1374
1 parent 4eea558 commit b74bf96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

http_service/bugbug_http/boot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def boot_worker():
4545

4646
# Download commits DB
4747
logger.info("Downloading commits DB...")
48-
commits_db_downloaded = db.download(repository.COMMITS_DB, support_files_too=True)
48+
commits_db_downloaded = db.download(
49+
repository.COMMITS_DB, support_files_too=True, use_single_process=True
50+
)
4951
if not ALLOW_MISSING_MODELS:
5052
assert commits_db_downloaded
5153

http_service/bugbug_http/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ def schedule_tests(branch, rev):
167167
)
168168

169169
# Analyze patches.
170-
commits = repository.download_commits(REPO_DIR, rev_start=first_rev, save=False)
170+
commits = repository.download_commits(
171+
REPO_DIR, rev_start=first_rev, save=False, use_single_process=True
172+
)
171173

172174
commit_data = commit_features.merge_commits(commits)
173175

0 commit comments

Comments
 (0)