code: def _file_watcher(state):
      
      conf = state.app.config
  
      file_path = conf.get('WAFFLE_WATCHER_FILE', '/tmp/waffleconf.txt')
  
      if not os.path.isfile(file_path):
          # Create watch file
          open(file_path, 'a').close()
  
      while True:
          tstamp = os.path.getmtime(file_path)
  
          # Compare timestamps and update config if needed
          if tstamp > state._tstamp:
              state.update_conf()
              state._tstamp = tstamp
  
          # Not too critical
          time.sleep(10)
docs: Watch for file changes and reload config when needed.
  
      Arguments:
          state (_WaffleState): Object that contains reference to app and its
              configstore.