def SvcStop ( self ) -> None : # tell the SCM we're shutting down # noinspection PyUnresolvedReferences self . ReportServiceStatus ( win32service . SERVICE_STOP_PENDING ) # fire the stop event win32event . SetEvent ( self . h_stop_event )
python stop service windows
Called when the service is being shut down .
def SvcStop(self) -> None:
        """
        Called when the service is being shut down.
        """
        # tell the SCM we're shutting down
        # noinspection PyUnresolvedReferences
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        # fire the stop event
        win32event.SetEvent(self.h_stop_event)