Settings Manager#
- class ccat_data_transfer.settings_manager.SettingsManager[source]#
Bases:
objectManager for handling dynamic system settings with Redis caching.
- get_setting(session: Session, key: str, default: Any | None = None) Any[source]#
Get a setting value, first checking Redis cache, then database.
- Parameters:
session (Session) – SQLAlchemy database session
key (str) – Setting key to retrieve
default (Any, optional) – Default value if setting not found
- Returns:
The setting value
- Return type:
Any
- set_setting(session: Session, key: str, value: Any, description: str | None = None, updated_by: str | None = None) None[source]#
Set a setting value in both database and Redis cache.
- Parameters:
session (Session) – SQLAlchemy database session
key (str) – Setting key to set
value (Any) – Value to set
description (str, optional) – Description of the setting
updated_by (str, optional) – Username of who updated the setting
Overview#
Dynamic settings management for the data transfer system.
Key Components#
Settings loading and validation
Dynamic configuration updates
Settings persistence and management