summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-12 08:13:25 +0100
committerDan McGee <dan@archlinux.org>2010-12-12 08:13:32 +0100
commit1553e2b5c93f1a8566af4ed07630910fce6bc3b1 (patch)
treef054382f2ddc2d6b9e64b3ef381fbd639f574d0c
parenta6e3f101e98e024ed6bc5c5d8043133294883bb0 (diff)
downloadarchweb-1553e2b5c93f1a8566af4ed07630910fce6bc3b1.tar.gz
archweb-1553e2b5c93f1a8566af4ed07630910fce6bc3b1.tar.xz
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 <dan@archlinux.org>
-rw-r--r--mirrors/utils.py2
1 files changed, 1 insertions, 1 deletions
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)