From 1553e2b5c93f1a8566af4ed07630910fce6bc3b1 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 12 Dec 2010 01:13:25 -0600 Subject: Use check count for this URL, not max of all mirrors Prevents a recently enabled mirror from getting unfairly represented as far as completion percentage goes. Signed-off-by: Dan McGee --- mirrors/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mirrors') diff --git a/mirrors/utils.py b/mirrors/utils.py index c64d53c..124b66e 100644 --- a/mirrors/utils.py +++ b/mirrors/utils.py @@ -51,7 +51,7 @@ def get_mirror_statuses(cutoff=default_cutoff): check_frequency = None for url in urls: - url.completion_pct = float(url.success_count) / num_checks + url.completion_pct = float(url.success_count) / url.check_count if url.id in delays: url_delays = delays[url.id] d = sum(url_delays, datetime.timedelta()) / len(url_delays) -- cgit v1.2.3-24-g4f1b