Spaces:
Running
Running
| """Autoload grant intelligence endpoints.""" | |
| from __future__ import annotations | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| def apply_grants_intelligence() -> None: | |
| try: | |
| from endpoints.grants_intelligence import register_intelligence_routes | |
| import endpoints.grants as grants_mod | |
| if getattr(grants_mod, "_intelligence_loaded", False): | |
| return | |
| # Router jest samodzielny — rejestracja przez app w bootstrap | |
| grants_mod._intelligence_loaded = True | |
| logger.info("[GrantIntelligence] loader ready") | |
| except ImportError as e: | |
| logger.warning("[GrantIntelligence] skip: %s", e) | |