import asyncio import sys import aiomysql from dotenv import load_dotenv load_dotenv(".env") from config.config_db import init_db_pool, close_db_pool async def main(): await init_db_pool() from config.config_db import get_db_pool from B01_Dashboard.B01_Dashboard_Repository import get_system_resources res = await get_system_resources(30) print("Current:", res["current"]) print("History count:", len(res["history"])) for h in res["history"][:5]: print(h) except Exception as e: print("Error:", e) await close_db_pool() if __name__ == "__main__": asyncio.run(main())