diff options
author | Hedayat Vatankhah <hedayat.fwd@gmail.com> | 2011-05-13 14:02:17 +0430 |
---|---|---|
committer | Hedayat Vatankhah <hedayat.fwd@gmail.com> | 2011-05-13 14:02:17 +0430 |
commit | 15834cea18aac82ea9f6c7a88ec0063ae075e140 (patch) | |
tree | 4d8e2d3a3662a94c12fc1d3cdd3ff056cfed0a21 | |
parent | 8b9f59673067cfa9ac52fbead70d37d8e5b2aa77 (diff) | |
download | yum-fast-downloader-15834cea18aac82ea9f6c7a88ec0063ae075e140.tar.gz yum-fast-downloader-15834cea18aac82ea9f6c7a88ec0063ae075e140.tar.xz yum-fast-downloader-15834cea18aac82ea9f6c7a88ec0063ae075e140.zip |
Add new options for aria2-1.11
* Add min split size option with the default at 1M
* Add max connection per server with 5 as default
-rw-r--r-- | yum-fast-downloader.conf | 3 | ||||
-rw-r--r-- | yum-fast-downloader.py | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/yum-fast-downloader.conf b/yum-fast-downloader.conf index 9d8840a..0393122 100644 --- a/yum-fast-downloader.conf +++ b/yum-fast-downloader.conf @@ -4,3 +4,6 @@ enabled=1 # Options controlling the behavior: # # max-concurrent-downloads=10 +# min_split_size=1M +# max_connection_per_server=5 +# diff --git a/yum-fast-downloader.py b/yum-fast-downloader.py index 682c43c..65e9072 100644 --- a/yum-fast-downloader.py +++ b/yum-fast-downloader.py @@ -126,6 +126,10 @@ def postconfig_hook(conduit): global_cache_dir = conduit.getConf().cachedir max_concurrent_downloads = conduit.confString('main', 'max-concurrent-downloads', default='10') + min_split_size = conduit.confString('main', + 'min_split_size', default='1M') + max_connection_per_server = conduit.confString('main', + 'max_connection_per_server', default='5') # append aria2c options downloader_common_args['aria2c'].append( @@ -134,7 +138,10 @@ def postconfig_hook(conduit): "--server-stat-of={0}/aria2c_server_stats".format(global_cache_dir)) downloader_common_args['aria2c'].append( "--max-concurrent-downloads={0}".format(max_concurrent_downloads)) - + downloader_common_args['aria2c'].append( + "--min-split-size={0}".format(min_split_size)) + downloader_common_args['aria2c'].append( + "--max-connection-per-server={0}".format(max_connection_per_server)) def prereposetup_hook(conduit): ret_insmethod = type(YumRepository._retrieveMD) |