summaryrefslogtreecommitdiffstats
path: root/mirrors
AgeCommit message (Collapse)AuthorFilesLines
2015-06-18Handle Django's level 3 verbosity properlyDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-06-18Catch SSL CertificateErrors and log themDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-06-18Silence DNS errors we see too often in productionDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Fix URL precedence due to /json/ and mirror name overlapDan McGee1-12/+12
Move these back into one block and just use function references rather than the string-based way. Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Include error message in JSON detail responseDan McGee1-1/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Break out mirror JSON API viewsDan McGee3-103/+114
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Break out mirrorlist viewsDan McGee3-123/+131
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Pylint suggested cleanupsDan McGee2-6/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Move mirrors views into subdirectoryDan McGee1-2/+2
We'll start splitting these up as we did in packages/. Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-26Add details links to third mirror status tableDan McGee2-5/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-12-11Don't blow up if lastsync file wasn't correctly fetchedDan McGee1-3/+6
Instead, pass None value in which is handled accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Remove percentage filter from Django templates filtersrelease_2014-11-08Dan McGee1-7/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Make delay a property, not a functionDan McGee1-0/+1
And re-indent the URL details log template now that we've broken it out. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Convert mirror status tables to Jinja2Dan McGee1-0/+22
Yay for way improved performance. Local testing showed render times going from 265 ms to 135 ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Convert some of URL details to Jinja2Dan McGee1-0/+31
Anytime we have a loop with >100 items, the Django template engine begins to be the bottleneck. This one is relatively straightforward to convert, and sets the stage for converting the mirror status page as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-02Mirror view tweaks and enhancementsDan McGee1-11/+26
* Add country column to main mirror list overview page. Most mirrors are strictly in one country, so do a little magic to show the right country if it makes sense. * Use new way of getting country names so we respect the overrides now present in the django_countries package. * Make the country selection box on the mirrorlist generation page a lot taller by default so it is easier to use. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-01Add bandwidth field to mirror URLsDan McGee3-2/+23
Not using this anywhere just yet, but suggested by Florian so we can do some more fancy things down the road, like determine bandwidth by country. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Fix error when viewing mirror with no active URLsDan McGee2-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Fix 500 when no URLs have been checkedrelease_2014-10-21Dan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Use cache_page on mirror status JSONDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Move caching of function data back to get_mirror_statusesDan McGee1-4/+3
We've moved this around a few times, including changing the parameters to ensure they are stable (commit bdfa22500f4). However, the bulk of the work takes place in the mashing up of the data, so cache the full result rather than just the result of a single query. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Simplify/clean-up finding of download mirrorDan McGee1-9/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Reduce complexity of status data URL queryDan McGee2-10/+9
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>
2014-10-21Remove queryset specialization in JSON encoderDan McGee1-4/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-21Small performance tweaks to mirror status JSON encodingDan McGee2-21/+16
Do a few things to speed up the encoding of the JSON, including better usage of list comprehensions, less dynamic setattr() usage, and removal of the queryset specialization since we can easily do it outside of the encoder. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-19Use raw DB query to fetch last modified dateDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Fix up some IP address field issuesDan McGee1-2/+2
Ensure we always coerce values to unicode in our __unicode__ method, and remove some now unneeded verbosity and comments since the upstream bug has been fixed. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Add auto-generated migrations from new Django migrations frameworkDan McGee1-0/+123
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Remove dependency on SouthDan McGee1-4/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Remove old south migrationsDan McGee28-2026/+0
Django 1.7 has built-in migrations support, so we no longer want these around. All existing installs should be fully migrated at this point to the latest schema. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Add details link to mirror status pagerelease_2014-09-01Dan McGee1-5/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-06-10Use last element in args tuple as error messageDan McGee1-1/+1
When things blow up in low-level C code, the tuple is sometimes of length one, such as when it contains this error message: _ssl.c:495: The handshake operation timed out Just use the last element of the tuple, which works for all of the cases. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-05-31Convert ~~~ to date/username text when editing mirror notesDan McGee1-0/+8
Requested by Florian to make leaving notes on mirrors a bit easier. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-03-29Protect ORM migration portion in db.dry_runDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-03-29Add last_modified column to mirrorsDan McGee3-1/+89
This will make it easier in the future to clear out inactive mirrors that haven't been touched in a while. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-02-22Upgrade django-countries to 2.0Dan McGee3-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-01-11Add a 'last_modified' function for mirror status pagesrelease_2014-01-11Dan McGee1-0/+7
We can use this on both the HTML and JSON views of this data to prevent recomputation for smart clients that respect the modified date header. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-23Set all attributes to default values on status URL fetchDan McGee1-0/+2
We were missing two duration-related attributes here, causing some 500 errors to happen if we had cached status_data around that didn't agree with our current list of checked mirrors. Don't blow up on the JSON data fetch by ensuring we provide a value, even if it is out of date. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-23Change import location of django_countries fieldsDan McGee1-1/+1
This will work with both the newer and older versions. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15Use select_related() in new mirror URL details viewDan McGee1-2/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15Add mirror URL details pageDan McGee3-0/+22
This will allow those that care about mirrors to zoom into URL-level details for each mirror and examine the individual check results. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-15Add delay function to MirrorLog modelDan McGee1-0/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Use stable parameters for cacheable functionDan McGee1-2/+3
It doesn't do much good to mark a function as cacheable if we call it every single time with different arguments due to using the current date and time. Fix it by passing the offset in instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Add update query for extracting Flyspray bug numberDan McGee1-0/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Add Flyspray Bug field to mirror modelDan McGee3-1/+86
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Show all mirror status data to authorized usersDan McGee2-14/+24
Regardless of whether the mirror URL is active or not, we often have data we can show the end user, especially if mirror admins care to see the data we've been gathering. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-27Stop using Django-provided floatformat template tagrelease_2013-11-30Dan McGee1-3/+8
It turns out this is a HUGE part of our slow mirror status template rendering, due to the internal workings. Everything is converted to a Python decimal object which is way slower than just staying in native floating point. Given we are always dealing with floats when we need to do our formatting, a home-rolled template tag can accomplish this much faster. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-06Django 1.6 upgrade, deprecation cleanupDan McGee1-1/+1
PendingDeprecationWarning: commit_on_success is deprecated in favor of atomic. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-06Django 1.6 upgrade, deprecation cleanupDan McGee1-0/+6
PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form needs updating Signed-off-by: Dan McGee <dan@archlinux.org>
2013-07-13Fix completion percentage calculation in mirror statusDan McGee1-2/+2
We sometimes record a duration even on a failed fetch attempt, such as if we get an HTTP 404. However, we never record a last_sync value on a failed fetch. Use this field instead to sum up the total number of successful checks. Signed-off-by: Dan McGee <dan@archlinux.org>