Remove deprecated files and scripts to streamline the codebase
- Deleted unused API test files, RTSP diagnostic scripts, and development utility scripts to reduce clutter. - Removed outdated database schema and modularization proposal documents to maintain focus on current architecture. - Cleaned up configuration files and logging scripts that are no longer in use, enhancing project maintainability.
This commit is contained in:
@@ -123,7 +123,7 @@ class APIServer:
|
||||
|
||||
def _setup_routes(self):
|
||||
"""Setup API routes"""
|
||||
|
||||
|
||||
# Register routes from modules
|
||||
register_system_routes(
|
||||
app=self.app,
|
||||
@@ -299,7 +299,24 @@ class APIServer:
|
||||
self._event_loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(self._event_loop)
|
||||
|
||||
uvicorn.run(self.app, host=self.config.system.api_host, port=self.config.system.api_port, log_level="info")
|
||||
# Map our log level to uvicorn's log level
|
||||
uvicorn_log_level_map = {
|
||||
"DEBUG": "debug",
|
||||
"INFO": "info",
|
||||
"WARNING": "warning",
|
||||
"ERROR": "error",
|
||||
"CRITICAL": "critical"
|
||||
}
|
||||
config_log_level = self.config.system.log_level.upper()
|
||||
uvicorn_log_level = uvicorn_log_level_map.get(config_log_level, "warning")
|
||||
|
||||
uvicorn.run(
|
||||
self.app,
|
||||
host=self.config.system.api_host,
|
||||
port=self.config.system.api_port,
|
||||
log_level=uvicorn_log_level,
|
||||
access_log=False # Disable access logs (GET, POST, etc.) to reduce noise
|
||||
)
|
||||
except Exception as e:
|
||||
self.logger.error(f"Error running API server: {e}")
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user