summaryrefslogtreecommitdiff
path: root/mirrors/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-10-21 09:39:06 -0500
committerDan McGee <dan@archlinux.org>2014-10-21 09:40:14 -0500
commit86fd0b722afb53670ef9a155a3c55d688f275c6d (patch)
treefc613902af22b32eca18eca007d2e04ca11bd1dc /mirrors/views.py
parent087b4b00031fed52eeddf05ae36825cb498680f0 (diff)
Reduce complexity of status data URL query
Get rid of all the junk trying to only return URLs that have been checked in the last 24 hours; it just isn't worth it. Instead, do that screening only in the views that need it, namely the HTML status page. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/views.py')
-rw-r--r--mirrors/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index 1a9741ed..90787763 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -245,7 +245,10 @@ def status(request, tier=None):
if tier is not None and url.mirror.tier != tier:
continue
# split them into good and bad lists based on delay
- if not url.delay or url.delay > bad_timedelta:
+ if url.completion_pct is None:
+ # skip URLs that have never been checked
+ continue
+ elif not url.delay or url.delay > bad_timedelta:
bad_urls.append(url)
else:
good_urls.append(url)