summaryrefslogtreecommitdiffstats
path: root/mirrors/management/commands/mirrorresolv.py
AgeCommit message (Collapse)AuthorFilesLines
2012-04-29mirrorresolv: only run update query if values changedDan McGee1-1/+7
98% of the time, we won't need to update the existing values as it will be the same as the prior run of this command. Do a quick check of the old and new values and don't send anything to the database if there is no need for an update. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18mirrors: pylint discovered cleanupsDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-27Auto-resolve mirror URLs on saveDan McGee1-6/+3
This prevents people from having to mess with these checkboxes at all in the admin, and we incur no delay on their initial values being correct waiting for the cron job to run. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-22Slight tweaks to mirror commandsDan McGee1-1/+1
We know we are doing updates when setting IPv4/IPv6 information, so set force_update to True to save the useless select query on each save(). For mirror checks, use a less cumbersome deque for the results since it is also thread-safe, and have all the log entries committed in one go. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-31Defer format string substitution to loggerDan McGee1-2/+4
Don't use 'fmtstr % (arg1, arg2)' type format; logger can be passed a format string and the arguments to populate it. Saves a bit of work for strings that never end up getting displayed anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-14Add mirrorresolv manage.py commandPyroPeter1-0/+55
Dan: * Fix up some style issues such as spacing between operators * Ensure one failed lookup doesn't crash the whole script * Be silent out of the box if there are no errors, just like mirrorcheck Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>