Add warning messages when enabling remote pickle-based repository access
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 02 Jul 2014 11:37:57 +0200
changeset 9890 57e2cffa6329
parent 9889 9b42e55e0686
child 9894 9461d1bd70bb
Add warning messages when enabling remote pickle-based repository access Warn when starting a pyro or zmq-only repo, or when one of these access methods is enabled. Closes #2919295
etwist/server.py
hooks/zmq.py
server/serverctl.py
--- a/etwist/server.py	Fri Jul 18 12:23:01 2014 +0200
+++ b/etwist/server.py	Wed Jul 02 11:37:57 2014 +0200
@@ -69,6 +69,7 @@
                 # if pyro is enabled, we have to register to the pyro name
                 # server, create a pyro daemon, and create a task to handle pyro
                 # requests
+                self.appli.repo.warning('remote repository access through pyro is deprecated')
                 self.pyro_daemon = self.appli.repo.pyro_register()
                 self.pyro_listen_timeout = 0.02
                 self.appli.repo.looping_task(1, self.pyro_loop_event)
--- a/hooks/zmq.py	Fri Jul 18 12:23:01 2014 +0200
+++ b/hooks/zmq.py	Wed Jul 02 11:37:57 2014 +0200
@@ -71,6 +71,7 @@
         address = config.get('zmq-repository-address')
         if not address:
             return
+        self.repo.warning('remote access to the repository via zmq/pickle is deprecated')
         from cubicweb.server import cwzmq
         self.repo.zmq_repo_server = server = cwzmq.ZMQRepositoryServer(self.repo)
         server.connect(address)
--- a/server/serverctl.py	Fri Jul 18 12:23:01 2014 +0200
+++ b/server/serverctl.py	Wed Jul 02 11:37:57 2014 +0200
@@ -677,6 +677,7 @@
     def run(self, args):
         from logilab.common.daemon import daemonize, setugid
         from cubicweb.cwctl import init_cmdline_log_threshold
+        print 'WARNING: Standalone repository with pyro or zmq access is deprecated'
         appid = args[0]
         debug = self['debug']
         if sys.platform == 'win32' and not debug: