I wrote an API server using waitress and falcon on windows. It's working great but now I need to run it as service so it monitorable. What's the best way to do this? I've looked at pywin32 and cherrypy's own implementation. I get stumped on on stopping waitress via python. I know ctrl-break is used when using the cmd but not sure what to use when using python.
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
cherrypy.server.stop()
win32event.SetEvent(self.stop_event)
I don't see waitress having a stop function like cherrypy.
Any help would be great. Even if it is outside of pywin32. Just need some details on how get waitress running as a service on windows as there are lots of ways to do it and I'm unsure which is recommended.
Thanks, Anthony