[ccplugin] get the cw repo from the wsgi app
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 22 Dec 2015 19:37:49 +0100
changeset 11664 7567e99d6ed5
parent 11663 6fb9d9276880
child 11665 d72a913b2ffe
[ccplugin] get the cw repo from the wsgi app Otherwise with cubicweb 3.22 we end up re-creating a new repo from scratch, which ends up in tears.
ccplugin.py
--- a/ccplugin.py	Wed Nov 04 16:41:36 2015 +0100
+++ b/ccplugin.py	Tue Dec 22 19:37:49 2015 +0100
@@ -316,7 +316,7 @@
 
         host = cwconfig['interface']
         port = cwconfig['port'] or 8080
-        repo = cwconfig.repository()
+        repo = app.application.registry['cubicweb.repository']
         try:
             repo.start_looping_tasks()
             waitress.serve(app, host=host, port=port)