Robert Brewer  committed b7b8790

Renamed restsrv -> process in all referrers.

  • Participants
  • Parent commits 9d2d4ba

Comments (0)

Files changed (9)

File cherrypy/

 from cherrypy._cptree import Application
 from cherrypy import _cpwsgi as wsgi
-from cherrypy import restsrv
+from cherrypy import process
-    from cherrypy.restsrv import win32 as _restsrvwin
-    engine = _restsrvwin.Win32Bus()
-    _console_control_handler = _restsrvwin.ConsoleCtrlHandler(engine)
+    from cherrypy.process import win32
+    engine = win32.Win32Bus()
+    _console_control_handler = win32.ConsoleCtrlHandler(engine)
     # If you don't want a ConsoleControlHandler,
     # unsubscribe this before calling engine.start().
+    del win32
 except ImportError:
-    engine = restsrv.bus
+    engine = process.bus
 # Timeout monitor
-class _TimeoutMonitor(restsrv.plugins.Monitor):
+class _TimeoutMonitor(process.plugins.Monitor):
     def __init__(self, bus):
         self.servings = []
-        restsrv.plugins.Monitor.__init__(self, bus,
+        process.plugins.Monitor.__init__(self, bus,
     def acquire(self):
         self.servings.append((serving.request, serving.response))
 # Add an autoreloader (the 'engine' config namespace may detach/attach it).
-engine.autoreload = restsrv.plugins.Autoreloader(engine)
+engine.autoreload = process.plugins.Autoreloader(engine)
-signal_handler = restsrv.plugins.SignalHandler(engine)
+signal_handler = process.plugins.SignalHandler(engine)
 from cherrypy import _cpserver
 server = _cpserver.Server()

File cherrypy/

 # We import * because we want to export check_port
 # et al as attributes of this module.
-from cherrypy.restsrv.servers import *
+from cherrypy.process.servers import *
 class Server(ServerAdapter):

File cherrypy/

 import sys
 import cherrypy
-from cherrypy.restsrv import plugins
+from cherrypy.process import plugins
 shortopts = ["d", "e"]

File cherrypy/lib/

         if not cls.clean_thread:
             # clean_up is in instancemethod and not a classmethod,
             # so that tool config can be accessed inside the method.
-            t = cherrypy.restsrv.plugins.Monitor(
+            t = cherrypy.process.plugins.Monitor(
                 cherrypy.engine, self.clean_up, self.clean_freq * 60)
             cls.clean_thread = t

File cherrypy/process/

 for each class.
-from cherrypy.restsrv.wspbus import bus
-from cherrypy.restsrv import plugins, servers
+from cherrypy.process.wspbus import bus
+from cherrypy.process import plugins, servers

File cherrypy/process/

     def start(self):
         """Start our callback in its own perpetual timer thread."""
         if self.frequency > 0:
-            threadname = "restsrv %s" % self.__class__.__name__
+            threadname = self.__class__.__name__
             if self.thread is None:
                 self.thread = PerpetualTimer(self.frequency, self.callback)

File cherrypy/process/

-"""Windows service for restsrv. Requires pywin32."""
+"""Windows service. Requires pywin32."""
 import os
 import thread
 import win32service
 import win32serviceutil
-from cherrypy.restsrv import wspbus, plugins
+from cherrypy.process import wspbus, plugins
 class ConsoleCtrlHandler(plugins.SimplePlugin):
     _svc_name_ = "Python Web Service"
     _svc_display_name_ = "Python Web Service"
     _svc_deps_ = None        # sequence of service names on which this depends
-    _exe_name_ = "restsrv"
+    _exe_name_ = "pywebsvc"
     _exe_args_ = None        # Default to no arguments
     # Only exists on Windows 2000 or later, ignored on windows NT
     _svc_description_ = "Python Web Service"
     def SvcDoRun(self):
-        from cherrypy import restsrv
-        restsrv.bus.start()
-        restsrv.bus.block()
+        from cherrypy import process
+        process.bus.start()
+        process.bus.block()
     def SvcStop(self):
-        from cherrypy import restsrv
+        from cherrypy import process
-        restsrv.bus.exit()
+        process.bus.exit()
     def SvcOther(self, control):
-        restsrv.bus.publish(control_codes.key_for(control))
+        process.bus.publish(control_codes.key_for(control))
 if __name__ == '__main__':

File cherrypy/scaffold/

 local_dir = os.path.join(os.getcwd(), os.path.dirname(__file__))
 import cherrypy
-from cherrypy.restsrv.plugins import Daemonizer, PIDFile
+from cherrypy.process.plugins import Daemonizer, PIDFile
 # TODO: Change this to import your project root.
 from cherrypy import scaffold

File cherrypy/test/

 starttime = time.time()
 import cherrypy
-from cherrypy.restsrv import plugins
+from cherrypy.process import plugins
 thisdir = os.path.join(os.getcwd(), os.path.dirname(__file__))
 PID_file_path = os.path.join(thisdir, 'pid_for_test_daemonize')