etwist/server.py
branchstable
changeset 4219 87203a0a3a81
parent 4212 ab6573088b4a
child 4221 da84ca26896d
equal deleted inserted replaced
4218:deb2dcffb301 4219:87203a0a3a81
   385     # serve it via standard HTTP on port set in the configuration
   385     # serve it via standard HTTP on port set in the configuration
   386     port = config['port'] or 8080
   386     port = config['port'] or 8080
   387     reactor.listenTCP(port, channel.HTTPFactory(website))
   387     reactor.listenTCP(port, channel.HTTPFactory(website))
   388     logger = getLogger('cubicweb.twisted')
   388     logger = getLogger('cubicweb.twisted')
   389     if not debug:
   389     if not debug:
       
   390         if sys.platform == 'win32':
       
   391             print "Under windows, you must use the service management commands (e.g : 'net start my_instance)'"
       
   392             sys.exit(0)
   390         print 'instance starting in the background'
   393         print 'instance starting in the background'
   391         if daemonize():
   394         if daemonize():
   392             return # child process
   395             return # child process
   393         if config['pid-file']:
   396         if config['pid-file']:
   394             # ensure the directory where the pid-file should be set exists (for
   397             # ensure the directory where the pid-file should be set exists (for