attempt to port windows service to 3.8.1 stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 06 May 2010 14:46:58 +0200
branchstable
changeset 5495 ce836b665a65
parent 5491 0a6e6fccfd30
child 5496 d1b6db4d7b3f
attempt to port windows service to 3.8.1
etwist/service.py
--- a/etwist/service.py	Thu May 06 14:27:57 2010 +0200
+++ b/etwist/service.py	Thu May 06 14:46:58 2010 +0200
@@ -26,8 +26,7 @@
     sys.exit(3)
 
 
-from cubicweb.etwist.server import (CubicWebRootResource, reactor, server,
-                                    parsePOSTData, channel)
+from cubicweb.etwist.server import (CubicWebRootResource, reactor, server)
 
 import logging
 from logging import getLogger, handlers
@@ -39,7 +38,7 @@
     for var in env_vars:
         if var not in env:
             raise Exception('The environment variables %s must be set.' % \
-                            ', '.join(env_vars))            
+                            ', '.join(env_vars))
     if not env.get('USERNAME'):
         env['USERNAME'] = 'cubicweb'
 
@@ -53,7 +52,6 @@
         cwcfg.load_cwctl_plugins()
         logger = getLogger('cubicweb')
         set_log_methods(CubicWebRootResource, logger)
-        server.parsePOSTData = parsePOSTData
 
     def SvcStop(self):
         self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
@@ -78,7 +76,7 @@
             # serve it via standard HTTP on port set in the configuration
             port = config['port'] or 8080
             logger.info('listening on port %s' % port)
-            reactor.listenTCP(port, channel.HTTPFactory(website))
+            reactor.listenTCP(port, website)
             root_resource.init_publisher()
             root_resource.start_service()
             logger.info('instance started on %s', root_resource.base_url)