def restart_stats_timer()

in fbtftp/base_server.py [0:0]


    def restart_stats_timer(self, run_once=False):
        """
        Start metric pushing timer thread, if a callback was specified.
        """
        if self._server_stats_callback is None:
            logging.warning(
                "No callback specified for server statistics "
                "logging, will continue without"
            )
            return
        self._metrics_timer = threading.Timer(
            self._server_stats.interval, self._metrics_callback_wrapper, [run_once]
        )
        logging.debug(
            "Starting the metrics callback in {sec}s".format(
                sec=self._server_stats.interval
            )
        )
        self._metrics_timer.start()