Pre-optimization commit: Calendar sync implementation with hub design

This commit is contained in:
root
2025-10-23 08:29:46 +00:00
parent 2f9203cac2
commit 1de5bcd369
12 changed files with 506 additions and 954 deletions

View File

@@ -9,6 +9,7 @@ class Config:
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PORT = int(os.getenv('REDIS_PORT', '6379'))
REDIS_DB_ADVOWARE_CACHE = int(os.getenv('REDIS_DB_ADVOWARE_CACHE', '1'))
REDIS_DB_CALENDAR_SYNC = int(os.getenv('REDIS_DB_CALENDAR_SYNC', '2'))
REDIS_TIMEOUT_SECONDS = int(os.getenv('REDIS_TIMEOUT_SECONDS', '5'))
# Advoware API settings
@@ -22,4 +23,11 @@ class Config:
ADVOWARE_ROLE = int(os.getenv('ADVOWARE_ROLE', '2'))
ADVOWARE_PASSWORD = os.getenv('ADVOWARE_PASSWORD', 'your_password')
ADVOWARE_TOKEN_LIFETIME_MINUTES = int(os.getenv('ADVOWARE_TOKEN_LIFETIME_MINUTES', '55'))
ADVOWARE_API_TIMEOUT_SECONDS = int(os.getenv('ADVOWARE_API_TIMEOUT_SECONDS', '30'))
ADVOWARE_API_TIMEOUT_SECONDS = int(os.getenv('ADVOWARE_API_TIMEOUT_SECONDS', '30'))
# Google Calendar API settings (Service Account only)
GOOGLE_CALENDAR_SERVICE_ACCOUNT_PATH = os.getenv('GOOGLE_CALENDAR_SERVICE_ACCOUNT_PATH', 'service-account.json')
GOOGLE_CALENDAR_SCOPES = ['https://www.googleapis.com/auth/calendar']
# Calendar Sync settings
CALENDAR_SYNC_ANONYMIZE_GOOGLE_EVENTS = os.getenv('CALENDAR_SYNC_ANONYMIZE_GOOGLE_EVENTS', 'true').lower() == 'true'