Reload the Flask server if any of the data files change.

master
Pacman Ghost 3 years ago
parent b387871bbe
commit a30c7b8741
  1. 2
      asl_rulebook2/webapp/run_server.py

@ -50,6 +50,8 @@ def main( bind_addr, data_dir, force_init_delay, flask_debug ):
# monitor extra files for changes
extra_files = []
fspecs = [ "static/", "templates/", "config/" ]
if app.config.get( "DATA_DIR" ):
fspecs.append( app.config["DATA_DIR"] )
for fspec in fspecs:
fspec = os.path.abspath( os.path.join( os.path.dirname(__file__), fspec ) )
if os.path.isdir( fspec ):

Loading…
Cancel
Save