when instance is started normally (eg not in debug mode), check versions before daemonization stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 12 Nov 2009 13:46:47 +0100
branchstable
changeset 3828 335e40fdb5a5
parent 3827 c7142a4e3470
child 3829 9674d62a54f9
when instance is started normally (eg not in debug mode), check versions before daemonization
etwist/server.py
--- a/etwist/server.py	Thu Nov 12 13:46:10 2009 +0100
+++ b/etwist/server.py	Thu Nov 12 13:46:47 2009 +0100
@@ -103,11 +103,13 @@
         assert self.base_url[-1] == '/'
         self.https_url = config['https-url']
         assert not self.https_url or self.https_url[-1] == '/'
+        # instantiate publisher here and not in init_publisher to get some
+        # checks done before daemonization (eg versions consistency)
+        self.appli = CubicWebPublisher(config, debug=self.debugmode)
+        self.versioned_datadir = 'data%s' % config.instance_md5_version()
 
     def init_publisher(self):
         config = self.config
-        self.appli = CubicWebPublisher(config, debug=self.debugmode)
-        self.versioned_datadir = 'data%s' % config.instance_md5_version()
         # when we have an in-memory repository, clean unused sessions every XX
         # seconds and properly shutdown the server
         if config.repo_method == 'inmemory':