feat: AI 余额监控服务(平台/账号 CRUD、并发轮询、Telegram 阈值提醒)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""AI Balance Monitor 入口:python main.py"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
import uvicorn
|
||||
|
||||
from app.api import create_app
|
||||
from app.config import load_config
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
|
||||
)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
cfg = load_config()
|
||||
app = create_app(cfg)
|
||||
print(f"AI Balance Monitor 已启动: http://127.0.0.1:{cfg.port}")
|
||||
uvicorn.run(app, host="0.0.0.0", port=cfg.port, log_level="warning")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user