def start_config_thread(self, filename, section=None, refresh_config_seconds=10):
        assert not self._loading_thread_started, "start_config_thread called twice!"
        self._update_from_config(filename, section=section)

        def refresh_config_loop():
            while True:
                time.sleep(refresh_config_seconds)
                try:
                    self._update_from_config(filename, section=section)
                    stats.set_gauge("successful-config-update", 1)
                except (IOError, yaml.parser.ParserError):
                    stats.set_gauge("successful-config-update", 0)
        thread = threading.Thread(target=refresh_config_loop)
        thread.daemon = True
        thread.start()
        self._loading_thread_started = True
Start a daemon thread to reload the given config file and section periodically.
dataset/ETHPy150Open dropbox/grouper/grouper/settings.py/Settings.start_config_thread