From fc7fc1d10a13e9b21d222435ba12affd1d08822f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 16 Feb 2011 21:51:23 -0600 Subject: 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 --- mirrors/management/commands/mirrorresolv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mirrors/management/commands/mirrorresolv.py') diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py index 8cbd51a3..77e7a223 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) -- cgit v1.2.3-54-g00ecf