260710_1
This commit is contained in:
+7
-21
@@ -1,23 +1,9 @@
|
||||
import asyncio
|
||||
import sys
|
||||
import aiomysql
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv(".env")
|
||||
import re
|
||||
|
||||
from config.config_db import init_db_pool, close_db_pool
|
||||
path = "D:/02_Software_Prog/임도설계 및 견적자동화 프로그램 개발/0_old/main.py"
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
code = f.read()
|
||||
|
||||
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())
|
||||
print("--- Endpoints ---")
|
||||
for m in re.finditer(r'@app\.(get|post)\("([^"]+)"\)', code):
|
||||
print(m.group(0))
|
||||
|
||||
Reference in New Issue
Block a user