Skip to content

Commit e366502

Browse files
authored
Merge pull request #393 from gerrod3/391
Fix syncing when download_concurrency is not set
2 parents 9115682 + 5597949 commit e366502

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGES/391.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed sync to use default concurrency (10) when download_concurrency was not specified

pulp_python/app/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class PythonRemote(Remote):
166166
"""
167167

168168
TYPE = 'python'
169+
DEFAULT_DOWNLOAD_CONCURRENCY = 10
169170
prereleases = models.BooleanField(default=False)
170171
includes = JSONField(default=list)
171172
excludes = JSONField(default=list)

pulp_python/app/tasks/sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ async def run(self):
115115
if self.remote.proxy_url:
116116
environ.pop('http_proxy')
117117
deferred_download = self.remote.policy != Remote.IMMEDIATE
118+
workers = self.remote.download_concurrency or self.remote.DEFAULT_DOWNLOAD_CONCURRENCY
118119
with ProgressReport(
119120
message="Fetching Project Metadata", code="sync.fetching.project"
120121
) as p:
121122
pmirror = PulpMirror(
122123
serial=0, # Serial currently isn't supported by Pulp
123124
master=master,
124-
workers=self.remote.download_concurrency,
125+
workers=workers,
125126
deferred_download=deferred_download,
126127
python_stage=self,
127128
progress_report=p,

0 commit comments

Comments
 (0)