def sigterm ( self , signum , frame ) : self . logger . warning ( "Caught signal %s. Stopping daemon." % signum ) sys . exit ( 0 )
killing server python sigint
These actions will be done after SIGTERM .
def sigterm(self, signum, frame):
        """
        These actions will be done after SIGTERM.
        """
        self.logger.warning("Caught signal %s. Stopping daemon." % signum)
        sys.exit(0)