diff --git a/run_server.py b/run_server.py index 7befa55..34f13df 100644 --- a/run_server.py +++ b/run_server.py @@ -12,11 +12,22 @@ if __name__ == "__main__": # Get logging configuration log_config = get_uvicorn_log_config() - # Run the application with logging + # Run the application with logging. + # Exclude directories that should not trigger reloads to prevent + # infinite loops caused by log file writes. uvicorn.run( "src.server.fastapi_app:app", host="127.0.0.1", port=8000, reload=True, + reload_excludes=[ + "logs/*", + "data/*", + "Temp/*", + "__pycache__/*", + "*.log", + "*.json", + "*.jsonl", + ], log_config=log_config, )