Bump the failure counter for mirrors which FM plugin failed
to connect to or the connect() took more than 10s.

XXX: factor in latencies below 10s to scale speed estimates?
---
 urlgrabber/grabber.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
index 1afb2c5..0d23271 100644
--- a/urlgrabber/grabber.py
+++ b/urlgrabber/grabber.py
@@ -2250,6 +2250,10 @@ def parallel_wait(meter=None):
                     speed, fail = _TH.estimate(key)
                     speed /= 1 + host_con.get(key, 0)
 
+                    # use fastestmirror data to (mostly) skip dead mirrors
+                    if mirror.get('kwargs', {}).get('timedhosts', 0) > 10:
+                        fail += 1
+
                     # order by: least failures, private flag, best speed
                     # ignore 'private' flag if there were failures
                     private = not fail and mirror.get('kwargs', 
{}).get('private', False)
-- 
1.7.11.7

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to