[repo] Use a connection instead of a session for repo.gc_stats()
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jan 2014 15:55:48 +0100
changeset 9506 7f6883783969
parent 9505 53225f66e7ca
child 9507 540cb068a7f9
[repo] Use a connection instead of a session for repo.gc_stats()
server/repository.py
--- a/server/repository.py	Wed Jan 29 15:56:44 2014 +0100
+++ b/server/repository.py	Wed Jan 29 15:55:48 2014 +0100
@@ -514,8 +514,8 @@
         nmax is the max number of (most) referenced object returned as
         the 'referenced' result
         """
-        with self.internal_session() as session:
-            return session.call_service('repo_gc_stats', nmax=nmax)
+        with self.internal_cnx() as cnx:
+            return cnx.call_service('repo_gc_stats', nmax=nmax)
 
     def get_schema(self):
         """Return the instance schema.