Your Name
feat: UI improvements and error suppression - Enhanced dashboard and market pages with improved header buttons, logo, and currency symbol display - Stopped animated ticker - Removed pie chart legends - Added error suppressor for external service errors (SSE, Permissions-Policy warnings) - Improved header button prominence and icon appearance - Enhanced logo with glow effects and better design - Fixed currency symbol visibility in market tables
8b7b267
| """ | |
| Resources Monitor - Dynamic monitoring of API resources | |
| """ | |
| import logging | |
| from typing import Dict, Any, Optional | |
| import asyncio | |
| from datetime import datetime | |
| logger = logging.getLogger(__name__) | |
| class ResourcesMonitor: | |
| """Monitor API resources and their health status""" | |
| def __init__(self): | |
| self.monitoring = False | |
| self._monitor_task: Optional[asyncio.Task] = None | |
| async def check_all_resources(self) -> Dict[str, Any]: | |
| """Check all resources and return status""" | |
| return { | |
| "status": "ok", | |
| "checked_at": datetime.utcnow().isoformat(), | |
| "resources": [] | |
| } | |
| def start_monitoring(self, interval: int = 3600): | |
| """Start periodic monitoring""" | |
| if not self.monitoring: | |
| self.monitoring = True | |
| logger.info(f"Resources monitoring started (interval: {interval}s)") | |
| def stop_monitoring(self): | |
| """Stop periodic monitoring""" | |
| if self.monitoring: | |
| self.monitoring = False | |
| logger.info("Resources monitoring stopped") | |
| # Singleton instance | |
| _monitor_instance: Optional[ResourcesMonitor] = None | |
| def get_resources_monitor() -> ResourcesMonitor: | |
| """Get or create resources monitor instance""" | |
| global _monitor_instance | |
| if _monitor_instance is None: | |
| _monitor_instance = ResourcesMonitor() | |
| return _monitor_instance | |