[web] Stop using config.repository()
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 24 Nov 2015 17:31:09 +0100
changeset 10923 846e5676ca39
parent 10922 7d01c8c675a0
child 10924 2125def9498b
[web] Stop using config.repository() Since commit 3914388b2d0f, this method creates a new Repository object and thus reloads all the cubes, taking for ever. Closes #8634417.
web/views/debug.py
--- a/web/views/debug.py	Tue Nov 24 16:57:07 2015 +0100
+++ b/web/views/debug.py	Tue Nov 24 17:31:09 2015 +0100
@@ -73,6 +73,7 @@
         dtformat = req.property_value('ui.datetime-format')
         _ = req._
         w = self.w
+        repo = req.cnx.repo
         # generic instance information
         w(u'<h2>%s</h2>' % _('Instance'))
         w(u'<table>')
@@ -83,7 +84,7 @@
         w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
             _('instance home'), self._cw.vreg.config.apphome))
         w(u'</table>')
-        vcconf = req.cnx.repo.get_versions()
+        vcconf = repo.get_versions()
         w(u'<h3>%s</h3>' % _('versions configuration'))
         w(u'<table>')
         w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
@@ -94,7 +95,6 @@
                 cube, cubeversion))
         w(u'</table>')
         # repository information
-        repo = req.vreg.config.repository(None)
         w(u'<h2>%s</h2>' % _('Repository'))
         w(u'<h3>%s</h3>' % _('resources usage'))
         w(u'<table>')