Refactor API route setup and enhance modularity
- Consolidated API route definitions by registering routes from separate modules for better organization and maintainability. - Removed redundant route definitions from the APIServer class, improving code clarity. - Updated camera monitoring and recording modules to utilize a shared context manager for suppressing camera SDK errors, enhancing error handling. - Adjusted timeout settings in camera operations for improved reliability during frame capture. - Enhanced logging and error handling across camera operations to facilitate better debugging and monitoring.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
API route modules.
|
||||
"""
|
||||
|
||||
from .system_routes import register_system_routes
|
||||
from .camera_routes import register_camera_routes
|
||||
from .recording_routes import register_recording_routes
|
||||
from .mqtt_routes import register_mqtt_routes
|
||||
from .storage_routes import register_storage_routes
|
||||
from .auto_recording_routes import register_auto_recording_routes
|
||||
from .recordings_routes import register_recordings_routes
|
||||
|
||||
__all__ = [
|
||||
"register_system_routes",
|
||||
"register_camera_routes",
|
||||
"register_recording_routes",
|
||||
"register_mqtt_routes",
|
||||
"register_storage_routes",
|
||||
"register_auto_recording_routes",
|
||||
"register_recordings_routes",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user