mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-13 14:29:42 +08:00
Make the DNF minrate setting configurable when loading repos
This commit is contained in:
@@ -689,6 +689,13 @@ class Config(object):
|
||||
"default": "master",
|
||||
"desc": "Denotes the branch used for rawhide.",
|
||||
},
|
||||
"dnf_minrate": {
|
||||
"type": int,
|
||||
"default": 1024 * 100, # 100KB
|
||||
"desc": "The minrate configuration on a DNF repo. This configuration will cause DNF to "
|
||||
"timeout loading a repo if the download speed is below minrate for the "
|
||||
"duration of the timeout."
|
||||
}
|
||||
}
|
||||
|
||||
def __init__(self, conf_section_obj):
|
||||
|
||||
@@ -362,7 +362,9 @@ def _get_rpms_in_external_repo(repo_url, arches, cache_dir_name):
|
||||
canon_arch = koji.canonArch(arch)
|
||||
repo_name = "repo_{}".format(canon_arch)
|
||||
repo_arch_url = repo_url.replace("$arch", canon_arch)
|
||||
base.repos.add_new_repo(repo_name, dnf_conf, baseurl=[repo_arch_url])
|
||||
base.repos.add_new_repo(
|
||||
repo_name, dnf_conf, baseurl=[repo_arch_url], minrate=conf.dnf_minrate,
|
||||
)
|
||||
|
||||
try:
|
||||
# Load the repos in parallel
|
||||
|
||||
Reference in New Issue
Block a user