[server] Use looping_task method in Repository._prepare_startup()
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 23 Feb 2017 08:37:39 +0100
changeset 11995 7d56ae4aa0ee
parent 11994 c1a6b18c141f
child 11996 b8ebd8724a37
[server] Use looping_task method in Repository._prepare_startup()
cubicweb/server/repository.py
--- a/cubicweb/server/repository.py	Mon Feb 27 17:13:45 2017 +0100
+++ b/cubicweb/server/repository.py	Thu Feb 23 08:37:39 2017 +0100
@@ -413,8 +413,7 @@
                 self.cleanup_session_time = self.config['cleanup-session-time'] or 60 * 60 * 24
                 assert self.cleanup_session_time > 0
                 cleanup_session_interval = min(60 * 60, self.cleanup_session_time / 3)
-                self._tasks_manager.add_looping_task(cleanup_session_interval,
-                                                     self.clean_sessions)
+                self.looping_task(cleanup_session_interval, self.clean_sessions)
 
     def start_looping_tasks(self):
         """Actual "Repository as a server" startup.