summaryrefslogtreecommitdiffstats
path: root/mirrors/utils.py
AgeCommit message (Collapse)AuthorFilesLines
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee1-2/+2
Remove never_cache from many places now that we don't actually need it since we aren't caching by default. Adjust our cache_function decorator times be shorter values, and also randomize them a bit to make cache invalidations not all line up. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12Switch back to using standard deviation in mirror check pageDan McGee1-2/+1
This got checked in by default, whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-11Add package signoffs JSON viewDan McGee1-1/+2
This allows access to the same data (and even a bit more) from the signoffs overview page in a machine-friendly way. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18mirrors: pylint discovered cleanupsDan McGee1-19/+23
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-13Add optional country override for individual mirror URLsDan McGee1-3/+6
This allows a named top-level mirror to have geographically distributed URLs, e.g. kernel.org and the geo-DNS setup. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-12Use check count for this URL, not max of all mirrorsDan McGee1-1/+1
Prevents a recently enabled mirror from getting unfairly represented as far as completion percentage goes. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07Factor check completion pct into mirror scoreDan McGee1-2/+7
Use it as the divisor in our slightly longer equation. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-02Fix an off by one error in math for check intervalDan McGee1-1/+5
Because we are averaging the interval and not the value, we need to subtract one from the total we are dividing by. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Use new is_download fieldDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30Mirror status improvementsDan McGee1-12/+17
* Fix sorting issues. '', 'unknown', and '∞' should now always sort after anything else in the list. * Add a completion percentage column; this will tell you at a glance if a mirror is sometimes unresponsive. This should probably be incorporated into the mirror score. * Make a few more things dynamic in the template, like the time back the page reflects. * Add some additional template tags for formatting things. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-25Give more information about mirror check runs and frequencyDan McGee1-5/+24
Show how many times the check has ran in the last 24 hours, as well as the average interval between checks. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-24Mirror status query refinementsDan McGee1-4/+4
Only show errors for active and public mirrors, and collapse two filter calls into just one for our normal status query. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Switch mirror status delay display to average delayDan McGee1-6/+19
This takes a bit more work to compute, but since we cache all of this anyway it isn't too big of deal. Using average delay instead of last delay will be a bit more fair on mirrors that have odd syncing schedules, as well as exposing those that only sync once a day. Also fix an issue that will arise with cutoff_time being calculated once, and adjust mirror score to treat hours delay as a float rather than an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Allow caching of mirror status infoDan McGee1-0/+45
Signed-off-by: Dan McGee <dan@archlinux.org>