From 15834cea18aac82ea9f6c7a88ec0063ae075e140 Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah Date: Fri, 13 May 2011 14:02:17 +0430 Subject: 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 --- yum-fast-downloader.conf | 3 +++ yum-fast-downloader.py | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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) -- cgit