mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
make dnf timeout configurable
This commit is contained in:
@@ -661,7 +661,12 @@ class Config(object):
|
||||
"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."
|
||||
}
|
||||
},
|
||||
"dnf_timeout": {
|
||||
"type": int,
|
||||
"default": 30,
|
||||
"desc": "The timeout configuration for dnf operations, in seconds."
|
||||
},
|
||||
}
|
||||
|
||||
def __init__(self, conf_section_obj):
|
||||
|
||||
@@ -366,6 +366,7 @@ def _get_rpms_in_external_repo(repo_url, arches, cache_dir_name):
|
||||
dnf_conf.cachedir = cache_location
|
||||
# Don't skip repos that can't be synchronized
|
||||
dnf_conf.skip_if_unavailable = False
|
||||
dnf_conf.timeout = conf.dnf_timeout
|
||||
# Get rid of everything to be sure it's a blank slate. This doesn't delete the cached repo data.
|
||||
base.reset(repos=True, goal=True, sack=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user