Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 5 and Version 6 of DeployAsWindowsService


Ignore:
Timestamp:
05/03/06 14:22:30 (13 years ago)
Author:
cleonello@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeployAsWindowsService

    v5 v6  
    5252}}} 
    5353 
    54  * The Cherrpy site also lists a [http://www.cherrypy.org/wiki/WindowsService21 similar method] of creating a Cherrypy Windows service. 
     54 * The Cherrpy site also lists a [http://docs.cherrypy.org/cherrypy22-as-windows-service similar method] of creating a Cherrypy Windows service. 
    5555 
    5656= Troubleshooting = 
    5757 
    58 Use the Windows Event Viewer, the stdout, and the stderr log files to locate problems with your application.   
     58Use the Windows Event Viewer, the stdout, and the stderr log files to locate problems with your application. 
    5959 
    6060= Code = 
     
    216216 
    217217}}} 
     218 
     219If your service stops when you log off Windows, try the following modification to the code: 
     220 
     221{{{ 
     222    ...snip... 
     223 
     224    # -- END USER EDIT SECTION 
     225    stop_event = win32event.CreateEvent(None, 0, 0, None) 
     226     
     227    def SvcDoRun(self): 
     228        """ Called when the Windows Service runs. """ 
     229 
     230        self.ReportServiceStatus(win32service.SERVICE_START_PENDING) 
     231        self.tg_init() 
     232        cherrypy.root = self.root() 
     233        self.ReportServiceStatus(win32service.SERVICE_RUNNING) 
     234        cherrypy.server.start(init_only=True) 
     235        win32event.WaitForSingleObject(TGWindowsService.stop_event, win32event.INFINITE) 
     236 
     237    ...snip... 
     238}}}