def __before_termination__(self, sig):
        """
        It will be called when a TERM signal is received,
        right before sys.exit(0)
        """
        print(
            "I'm going to be killed. My pid:{}, signal received:{}"
            .format(
                self.pid, sig
            )
        )

        It will be called when a TERM signal is received,
        right before sys.exit(0)
        
dHydra/Worker/SinaL2/SinaL2.py