[mirrormanager] master: generate-publiclist: add debug logging (e9c3215)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit e9c3215231121e65ef585e5f36b8e7291e402380
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 23:41:29 2013 -0500
generate-publiclist: add debug logging
>---------------------------------------------------------------
server/generate-publiclist | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/server/generate-publiclist b/server/generate-publiclist
index 5090c99..d9454b9 100755
--- a/server/generate-publiclist
+++ b/server/generate-publiclist
@@ -173,8 +173,10 @@ def generate_one_html(engine, pvaMatrix, productname=None, vername=None, archnam
try:
hosts = pvaMatrix.get_pva(productname, vername, archname)
+ logger.debug('pvaMatrix(%s, %s, %s) had %d hosts' % (productname, vername, archname, len(hosts)))
except KeyError:
hosts = publiclist_hosts(productname=productname, vername=vername, archname=archname)
+ logger.debug('pvaMatrix(%s, %s, %s) did not have hosts, query required.' % (productname, vername, archname))
bandwidth = 0
10 years, 9 months
[mirrormanager] master: add EXISTS to TODO (1979aad)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 1979aada3b8ae153a87fe59c176fe94aa01e864a
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 23:41:01 2013 -0500
add EXISTS to TODO
>---------------------------------------------------------------
TODO | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/TODO b/TODO
index 7f62cf9..cbe8f69 100644
--- a/TODO
+++ b/TODO
@@ -14,7 +14,10 @@ Short Term:
* move Fedora-specific apps into a server/fedora directory, add /usr/share/mirrormanager/server to sys.path.
* crawlers failing after a 90min timeout - why?
* consider making http redirects only redirect to http servers, not FTP (fixes bfo/ipxe)
-
+* publiclist_hosts() query should use an EXISTS clause to reduce query
+ time considerably. The long list of directories and
+ HostCategoryURLs currently being generated by the joins is crazy, an
+ EXISTS clause should be able to reduce that to a single row.
Long Term:
10 years, 9 months
[mirrormanager] master: generate-publiclist: convert to using logging module (481df2f)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 481df2f4cd4d08223f6c981c99b932b1a4f8fb04
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 22:48:02 2013 -0500
generate-publiclist: convert to using logging module
>---------------------------------------------------------------
server/generate-publiclist | 40 +++++++++++++++++++++++++++++-----------
1 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/server/generate-publiclist b/server/generate-publiclist
index 562a2fe..5090c99 100755
--- a/server/generate-publiclist
+++ b/server/generate-publiclist
@@ -7,9 +7,11 @@ import datetime as dt
import errno
from inspect import isclass
from itertools import izip
+import logging
import optparse
import os
import sys
+import time
import turbogears
import turbogears.util as tg_util
from turbogears import config
@@ -19,6 +21,18 @@ sys.path.append("/usr/share/mirrormanager/server")
from mirrormanager.model import Product, publiclist_arches, publiclist_hosts
hub = __connection__ = None
+logger = None
+
+def setup_logger():
+ fmt = "%(asctime)s %(message)s"
+ formatter = logging.Formatter(fmt=fmt)
+ formatter.converter = time.gmtime
+ logger = logging.getLogger('generate-publiclist')
+ handler = logging.handlers.WatchedFileHandler(options.logfile, "a+b")
+ handler.setFormatter(formatter)
+ logger.addHandler(handler)
+ logger.setLevel(logging.DEBUG)
+ return logger
def _process_output(output, template, format, engine):
"""Produces final output form from the data returned from a
@@ -109,9 +123,8 @@ class ProductVersionArchMatrix:
for a in publiclist_arches():
hosts = publiclist_hosts(productname=p.name, vername=v.name, archname=a.name)
self.set_pva(p.name, v.name, a.name, hosts)
- msg = "filled %s/%s/%s with %s hosts\n" % (p.name, v.name, a.name, len(hosts))
- sys.stdout.write(msg)
- sys.stdout.flush()
+ msg = "filled %s/%s/%s with %s hosts" % (p.name, v.name, a.name, len(hosts))
+ logger.info(msg)
@@ -146,9 +159,8 @@ def generate_all():
def generate_one_html(engine, pvaMatrix, productname=None, vername=None, archname=None):
pva = make_pva(productname, vername, archname)
- msg = "making %s\n" % pva
- sys.stdout.write(msg)
- sys.stdout.flush()
+ msg = "making %s" % pva
+ logger.info(msg)
title = "%s %s Public Active Mirrors" % (config.get('mirrormanager.projectname','Fedora'),
pva)
@@ -168,9 +180,8 @@ def generate_one_html(engine, pvaMatrix, productname=None, vername=None, archnam
bandwidth = 0
for h in hosts:
if not isinstance(h.bandwidth_int, int):
- msg = '%s bandwidth_int was not an int: %s\n' % (h, h.bandwidth_int)
- sys.stdout.write(msg)
- sys.stdout.flush()
+ msg = '%s bandwidth_int was not an int: %s' % (h, h.bandwidth_int)
+ logger.warning(msg)
h.bandwidth_int = 1
bandwidth = bandwidth + h.bandwidth_int
bandwidth = bandwidth / 1024 # convert to Gb
@@ -202,9 +213,13 @@ def main():
parser.add_option("-c", "--config",
dest="config", default='dev.cfg',
help="TurboGears config file to use")
-
+ parser.add_option("--logfile", type="string", metavar="FILE",
+ dest="logfile",
+ default='/var/log/mirrormanager/generate-publiclist.log',
+ help="write logfile to FILE")
parser.add_option("-o", "--output",
- metavar="DIR", dest="output", action="store", type="string", help="write output to DIR")
+ metavar="DIR", dest="output", action="store", type="string",
+ help="write output to DIR")
(options, args) = parser.parse_args()
if options.output is None:
@@ -218,6 +233,9 @@ def main():
hub = PackageHub("mirrormanager")
__connection__ = hub
+ global logger
+ logger = setup_logger()
+
generate_all()
10 years, 9 months
[mirrormanager] master: generate-publiclist: clean up imports (48be6a3)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 48be6a3df4724e773b47b9d8bd13bc8080324553
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 22:42:18 2013 -0500
generate-publiclist: clean up imports
>---------------------------------------------------------------
server/generate-publiclist | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/server/generate-publiclist b/server/generate-publiclist
index 64c923c..562a2fe 100755
--- a/server/generate-publiclist
+++ b/server/generate-publiclist
@@ -3,19 +3,21 @@ __requires__ = 'TurboGears[future]'
import pkg_resources
pkg_resources.require("TurboGears")
-from sqlobject import *
-import sys, os, string, errno
import datetime as dt
+import errno
+from inspect import isclass
+from itertools import izip
+import optparse
+import os
+import sys
import turbogears
import turbogears.util as tg_util
-from turbogears import view, database, errorhandling, config
-from itertools import izip
-from inspect import isclass
+from turbogears import config
from turbogears.view import engines
-from optparse import OptionParser
-from mirrormanager.model import *
-
from turbogears.database import PackageHub
+sys.path.append("/usr/share/mirrormanager/server")
+from mirrormanager.model import Product, publiclist_arches, publiclist_hosts
+
hub = __connection__ = None
def _process_output(output, template, format, engine):
@@ -196,7 +198,7 @@ options=None
def main():
global options
- parser = OptionParser(usage=sys.argv[0] + " [options]")
+ parser = optparse.OptionParser(usage=sys.argv[0] + " [options]")
parser.add_option("-c", "--config",
dest="config", default='dev.cfg',
help="TurboGears config file to use")
10 years, 9 months
[mirrormanager] master: categorymap: removing an item not in the list raises ValueError (07ea6a6)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 07ea6a6f351c76569d86c9393019b1cb173d92e6
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 22:20:59 2013 -0500
categorymap: removing an item not in the list raises ValueError
>---------------------------------------------------------------
server/mirrormanager/categorymap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/mirrormanager/categorymap.py b/server/mirrormanager/categorymap.py
index bec2794..77c22b9 100644
--- a/server/mirrormanager/categorymap.py
+++ b/server/mirrormanager/categorymap.py
@@ -43,7 +43,7 @@ def categorymap(productname, vername):
for c in categoriesToDrop:
try:
categories.remove(c)
- except KeyError:
+ except ValueError:
pass
return categories
10 years, 9 months
[mirrormanager] master: crawler: open stderr file with mode "a", not "r+" (aa80036)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit aa800369ed7565c07ad1eabee1804d6486d4b9cc
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 22:15:44 2013 -0500
crawler: open stderr file with mode "a", not "r+"
>---------------------------------------------------------------
server/crawler | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/crawler b/server/crawler
index 2486ce5..efd32a0 100755
--- a/server/crawler
+++ b/server/crawler
@@ -79,7 +79,7 @@ class ForkingMaster:
def process_request(self, command, args, host):
"""Fork a new subprocess to process the request."""
logger.info("Starting crawler %s: %s" % (host.name, args))
- stderr = open(os.path.join(options.logdir, "%d-stderr.log" % host.id), 'r+')
+ stderr = open(os.path.join(options.logdir, "%d-stderr.log" % host.id), 'a')
p = Popen(args, executable=command, stdin=self.devnull, stdout=self.devnull, stderr=stderr, close_fds=True)
self.start_time(p, host.id)
logger.debug("Adding child pid %d" % p.pid)
10 years, 9 months
[mirrormanager] master: remove Expires from apache mirrorlists config (185a1f0)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 185a1f0db269acf45f130b106699ff4deba4eb02
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 22:13:12 2013 -0500
remove Expires from apache mirrorlists config
>---------------------------------------------------------------
mirrorlist-server/apache/mirrorlist-server.conf | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/mirrorlist-server/apache/mirrorlist-server.conf b/mirrorlist-server/apache/mirrorlist-server.conf
index a3ca826..2858c63 100644
--- a/mirrorlist-server/apache/mirrorlist-server.conf
+++ b/mirrorlist-server/apache/mirrorlist-server.conf
@@ -4,8 +4,6 @@ Alias /static /var/lib/mirrormanager/mirrorlists/static/
<Directory /var/lib/mirrormanager/mirrorlists>
Options Indexes FollowSymLinks
- ExpiresActive On
- ExpiresDefault "modification plus 1 hour"
</Directory>
WSGIDaemonProcess mirrorlist user=apache processes=45 threads=1 display-name=mirrorlist maximum-requests=1000
10 years, 9 months
[mirrormanager] master: crawler: record crawler_perhost stderr in case of failures (09ede2c)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 09ede2c737d3e7d70b7befa223fd9bf4065a98a9
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 17:11:01 2013 -0500
crawler: record crawler_perhost stderr in case of failures
>---------------------------------------------------------------
server/crawler | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/crawler b/server/crawler
index efbdba5..2486ce5 100755
--- a/server/crawler
+++ b/server/crawler
@@ -79,7 +79,8 @@ class ForkingMaster:
def process_request(self, command, args, host):
"""Fork a new subprocess to process the request."""
logger.info("Starting crawler %s: %s" % (host.name, args))
- p = Popen(args, executable=command, stdin=self.devnull, stdout=self.devnull, stderr=self.devnull, close_fds=True)
+ stderr = open(os.path.join(options.logdir, "%d-stderr.log" % host.id), 'r+')
+ p = Popen(args, executable=command, stdin=self.devnull, stdout=self.devnull, stderr=stderr, close_fds=True)
self.start_time(p, host.id)
logger.debug("Adding child pid %d" % p.pid)
self.active_children.append(p)
10 years, 9 months
[mirrormanager] master: remove more unused references to Fedora Core and Extras (4eb899b)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 4eb899bee246f72e6d13818944b35e70098a0d65
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 14:07:26 2013 -0500
remove more unused references to Fedora Core and Extras
>---------------------------------------------------------------
server/dev.cfg | 25 ++++------
server/errorcheck | 41 +++++++---------
server/mirrormanager/model.py | 4 +-
server/mirrormanager/repomap.py | 99 +--------------------------------------
4 files changed, 30 insertions(+), 139 deletions(-)
diff --git a/server/dev.cfg b/server/dev.cfg
index 03288da..646cc53 100644
--- a/server/dev.cfg
+++ b/server/dev.cfg
@@ -23,27 +23,20 @@
# update-master-directory-list upstream definition
# a dictionary in a list with following content
-# [{ 'type':'type (rsync or file)',
-# 'url':'rsync URL or file path',
+# [{ 'type':'type (rsync, or directory)',
+# 'url':'rsync URL or directory path',
# 'category':'category name',
# 'options':'extra rsync options' }]
# remember to end URLs with a slash!
# type=directory 'excludes' is a regular expression.
umdl.master_directories = ''' [
-# { 'type':'file', 'url':'/tmp/fedora-linux-core.txt', 'category':'Fedora Core' },
-# { 'type':'file', 'url':'/tmp/fedora-linux-extras.txt', 'category':'Fedora Extras' },
- { 'type':'rsync', 'url':'/pub/epel/', 'category':'Fedora EPEL' },
-# { 'type':'rsync', 'url':'/pub/fedora/linux/', 'category':'Fedora Linux',
-# 'options':"--exclude='**/core/' --exclude='**/extras/' --exclude='**/[7-8]'" },
- { 'type':'rsync', 'url':'rsync://secondary1.fedora.phx.redhat.com/fedora-secondary/',
- 'category':'Fedora Secondary Arches' },
- { 'type':'rsync', 'url':'rsync://secondary1.fedora.phx.redhat.com/fedora-archive/',
- 'category':'Fedora Archive',
- 'options':"--exclude='**/core/' --exclude='**/extras/'" },
- { 'type':'rsync', 'url':'rsync://secondary1.fedora.phx.redhat.com/alt/',
- 'category':'Fedora Other' },
- { 'type':'directory', 'path':'/pub/fedora/linux/',
- 'category':'Fedora Linux', 'excludes':['.*/core/?.*', '.*/extras/?.*', '.*/[7-8]/?.*' ] },
+ { 'type':'directory', 'path':'/pub/epel/', 'category':'Fedora EPEL' },
+ { 'type':'directory', 'path':'/pub/fedora/linux/', 'category':'Fedora Linux'},
+ { 'type':'directory', 'path':'/pub/fedora-secondary/', 'category':'Fedora Secondary Arches' },
+ { 'type':'directory', 'path':'/pub/archive/', 'category':'Fedora Archive'},
+ { 'type':'directory', 'path':'/pub/alt/','category':'Fedora Other' },
+# { 'type':'directory', 'path':'/pub/fedora/linux/',
+# 'category':'Fedora Linux', 'excludes':['.*/core/?.*', '.*/extras/?.*', '.*/[7-8]/?.*' ] },
# { 'type':'rsync', 'url':'rsync://archive.ubuntu.com/ubuntu/',
# 'category':'Ubuntu Archive' },
# { 'type':'rsync', 'url':'rsync://releases.ubuntu.com/releases/',
diff --git a/server/errorcheck b/server/errorcheck
index cb11a99..933c555 100755
--- a/server/errorcheck
+++ b/server/errorcheck
@@ -238,32 +238,29 @@ def check_host(sr, host):
always_up2date = False
- undesired_categories = [u'Fedora Core', u'Fedora Extras']
-
for hc in host.categories:
- if hc.category.name not in undesired_categories:
- if len(hc.urls) == 0:
- msg = u"* Host %s Category %s has no URLs. Please add a URL to the content your mirror carries, or if not carried, delete the Category." % (host.name, hc.category.name)
- host_messages.append(msg)
+ if len(hc.urls) == 0:
+ msg = u"* Host %s Category %s has no URLs. Please add a URL to the content your mirror carries, or if not carried, delete the Category." % (host.name, hc.category.name)
+ host_messages.append(msg)
- has_rsync = False
- for url in hc.urls:
- if url.url.startswith(u'rsync://'):
- has_rsync = True
- break
- if not has_rsync:
- if (host.internet2 and host.internet2_clients) or not host.is_private():
- msg = u"* Please consider adding an rsync URL for Category %s. This will speed up the MirrorManager crawler and reduce load on your server. URLs can be marked 'for other mirrors only', in which case they will not appear in publiclists, mirrorlists, or metalinks, but will be available to the MirrorManager crawler. If necessary, you can restrict access to only allow from the MirrorManager crawler through a 'hosts allow = 209.132.181.0/24' line in your rsyncd.conf file." % hc.category.name
- host_messages.append(msg)
+ has_rsync = False
+ for url in hc.urls:
+ if url.url.startswith(u'rsync://'):
+ has_rsync = True
+ break
+ if not has_rsync:
+ if (host.internet2 and host.internet2_clients) or not host.is_private():
+ msg = u"* Please consider adding an rsync URL for Category %s. This will speed up the MirrorManager crawler and reduce load on your server. URLs can be marked 'for other mirrors only', in which case they will not appear in publiclists, mirrorlists, or metalinks, but will be available to the MirrorManager crawler. If necessary, you can restrict access to only allow from the MirrorManager crawler through a 'hosts allow = 209.132.181.0/24' line in your rsyncd.conf file." % hc.category.name
+ host_messages.append(msg)
- if hc.always_up2date: always_up2date = True
- if len(hc.dirs) == 0 and not hc.always_up2date:
- msg = u"* Host %s Category %s has no up-to-date directories. " % (host.name, hc.category.name)
- if len(hc.urls) > 0:
- msg += u"Check that your Category URL points to %s. " % (hc.category.topdir.name)
+ if hc.always_up2date: always_up2date = True
+ if len(hc.dirs) == 0 and not hc.always_up2date:
+ msg = u"* Host %s Category %s has no up-to-date directories. " % (host.name, hc.category.name)
+ if len(hc.urls) > 0:
+ msg += u"Check that your Category URL points to %s. " % (hc.category.topdir.name)
- msg += u"* Consult the crawler logs and check your report_mirror.conf."
- host_messages.append(msg)
+ msg += u"* Consult the crawler logs and check your report_mirror.conf."
+ host_messages.append(msg)
private_msg = u" Private mirrors must run report_mirror after each rsync run completes in order for MirrorManager to know what content your mirror carries. The crawler does not generally run against private mirrors."
diff --git a/server/mirrormanager/model.py b/server/mirrormanager/model.py
index 4160894..54bd2f9 100644
--- a/server/mirrormanager/model.py
+++ b/server/mirrormanager/model.py
@@ -706,8 +706,6 @@ class Directory(SQLObject):
class sqlmeta:
cacheValues = False
# Full path
- # e.g. pub/fedora/linux/core/6/i386/os
- # e.g. pub/fedora/linux/extras
# e.g. pub/epel
# e.g. pub/fedora/linux
name = UnicodeCol(alternateID=True, length=UnicodeColKeyLength)
@@ -782,7 +780,7 @@ class Category(SQLObject):
class sqlmeta:
cacheValues = False
# Top-level mirroring
- # e.g. core, extras, release, epel
+ # e.g. 'Fedora Linux', 'Fedora Archive'
name = UnicodeCol(alternateID=True, length=UnicodeColKeyLength)
product = ForeignKey('Product')
canonicalhost = UnicodeCol(default='http://download.fedora.redhat.com')
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index 4360850..548f558 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -1,54 +1,3 @@
-# The various name permutations for mirrorlist files are:
-# core-6-US-i386.txt and core-6-global-i386.txt
-# core-source-6-global-i386.txt (no per-country)
-# core-debug-6-global-i386.txt (no per-country)
-# extras-6-US-i386.txt and extras-6-glboal-i386.txt
-# extras-source-6-global-i386.txt (no per-country)
-# extras-debug-6-global-i386.txt (no per-country)
-# rawhide-US-i386.txt
-# updates-released-6-US-i386.txt
-# updates-released-debug-fc6-US-i386.txt
-# updates-released-
-#
-# country or global is usually appended
-# basearch is always appended coming from the mirrorlist cgi
-# to the key, the value $releasever is always appended, except for rawhide and development
-# hint - this isn't actually used by anything right now
-repomap = {
- u'core-' : (u'Fedora', u'Fedora Core'),
- u'core-debug-' : (u'Fedora', u'Fedora Core'),
- u'core-source-' : (u'Fedora', u'Fedora Core'),
-
- u'updates-released-' : (u'Fedora', u'Fedora Core'),
- u'updates-released-debug-' : (u'Fedora', u'Fedora Core'),
- u'updates-released-source-' : (u'Fedora', u'Fedora Core'),
-
- u'updates-testing-' : (u'Fedora', u'Fedora Core'),
- u'updates-testing-debug-' : (u'Fedora', u'Fedora Core'),
- u'updates-testing-source-' : (u'Fedora', u'Fedora Core'),
-
- u'rawhide' : (u'Fedora', u'Fedora Linux'),
- u'rawhide-debug' : (u'Fedora', u'Fedora Linux'),
- u'rawhide-source' : (u'Fedora', u'Fedora Linux'),
-
- u'extras-' : (u'Fedora', u'Fedora Extras'),
- u'extras-debug-' : (u'Fedora', u'Fedora Extras'),
- u'extras-source-' : (u'Fedora', u'Fedora Extras'),
-
- u'extras-devel' : (u'Fedora', u'Fedora Extras'),
- u'extras-devel-debug' : (u'Fedora', u'Fedora Extras'),
- u'extras-devel-source' : (u'Fedora', u'Fedora Extras'),
-
- u'epel-' : (u'EPEL', u'Fedora EPEL'),
- u'epel-debug-' : (u'EPEL', u'Fedora EPEL'),
- u'epel-source-' : (u'EPEL', u'Fedora EPEL'),
-
- u'rhel-' : (u'RHEL', u'RHEL'),
- u'rhel-debug-' : (u'RHEL', u'RHEL'),
- u'rhel-source-' : (u'RHEL', u'RHEL'),
- u'rhel-optional-' : (u'RHEL', u'RHEL'),
- }
-
import re
def is_development(path):
@@ -80,8 +29,6 @@ def repo_prefix(path, category, ver):
isEverything = u'Everything' in path
- isCore = u'core/' in path
- isExtras = u'extras/' in path
isEpel = (category.name == u'Fedora EPEL')
isFedoraLinux = (category.name == u'Fedora Linux')
isFedoraSecondary = (category.name == u'Fedora Secondary Arches')
@@ -98,51 +45,7 @@ def repo_prefix(path, category, ver):
if not isRawhide and ver is not None:
version = ver['name']
- if isCore:
- if isUpdatesReleased:
- # updates-released-
- if isDebug:
- prefix = u'updates-released-debug-fc%s' % version
- elif isSource:
- prefix = u'updates-released-source-fc%s' % version
- else:
- prefix = u'updates-released-fc%s' % version
- elif isUpdatesTesting:
- # updates-testing-
- if isDebug:
- prefix = u'updates-testing-debug-fc%s' % version
- elif isSource:
- prefix = u'updates-testing-source-fc%s' % version
- else:
- prefix = u'updates-testing-fc%s' % version
- elif isRawhide:
- # rawhide
- # Core rawhide is dead.
- prefix = None
- else:
- # core-
- if isDebug:
- prefix = u'core-debug-%s' % version
- elif isSource:
- prefix = u'core-source-%s' % version
- else:
- prefix = u'core-%s' % version
-
- elif isExtras:
- if isRawhide:
- # extras-development
- # extras-development is dead.
- prefix = None
- else:
- # extras-
- if isDebug:
- prefix = u'extras-debug-%s' % version
- elif isSource:
- prefix = u'extras-source-%s' % version
- else:
- prefix = u'extras-%s' % version
-
- elif isEpel:
+ if isEpel:
# epel-
if isTesting:
# testing-
10 years, 9 months
[mirrormanager] master: crawler: return value from total_seconds() (8ab3cd2)
by Matt Domsch
Repository : http://git.fedorahosted.org/cgit/
On branch : master
>---------------------------------------------------------------
commit 8ab3cd2ff24b2999df286bbfaf3aceacb6c1638b
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 13:26:54 2013 -0500
crawler: return value from total_seconds()
>---------------------------------------------------------------
server/crawler | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/crawler b/server/crawler
index 11957c6..efbdba5 100755
--- a/server/crawler
+++ b/server/crawler
@@ -27,7 +27,7 @@ hub = __connection__ = None
logger = None
def total_seconds(td):
- td.seconds + td.days * 24 * 3600
+ return td.seconds + td.days * 24 * 3600
class ForkingMaster:
def __init__(self, max_children = 10):
10 years, 9 months