summaryrefslogtreecommitdiffstats
path: root/mirrors/management/commands/mirrorresolv.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-17 04:51:23 +0100
committerDan McGee <dan@archlinux.org>2011-02-22 22:43:48 +0100
commitfc7fc1d10a13e9b21d222435ba12affd1d08822f (patch)
tree08ccd24ee854506542b546e184f5423dcde0e331 /mirrors/management/commands/mirrorresolv.py
parentb9fdcd06222c674d5fabcf5a4ab6bc55f268c757 (diff)
downloadarchweb-fc7fc1d10a13e9b21d222435ba12affd1d08822f.tar.gz
archweb-fc7fc1d10a13e9b21d222435ba12affd1d08822f.tar.xz
Slight tweaks to mirror commands
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>
Diffstat (limited to 'mirrors/management/commands/mirrorresolv.py')
-rw-r--r--mirrors/management/commands/mirrorresolv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index 8cbd51a..77e7a22 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -50,7 +50,7 @@ def resolve_mirrors():
mirrorurl.has_ipv6 = socket.AF_INET6 in families
logger.debug("%s: v4: %s v6: %s", hostname,
mirrorurl.has_ipv4, mirrorurl.has_ipv6)
- mirrorurl.save()
+ mirrorurl.save(force_update=True)
except socket.error, e:
logger.warn("error resolving %s: %s", hostname, e)