def sig_term(self, *args): """if we receive a term signal, we will shutdown properly """ self.log.warn("Shutdown ...") self.stop() sys.exit(0)