feat: 增加用户信息接口

This commit is contained in:
2026-09-05 16:27:14 +08:00
parent abacbe7a5d
commit 9d694e2a44
6 changed files with 61 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ from apscheduler.schedulers.background import BackgroundScheduler
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from config.database import get_db
from config.database import SessionLocal
from routers import routers
from service import agent_service
@@ -16,7 +16,8 @@ def article_job_task():
"""定时执行的任务"""
try:
print(f"今日资讯定时任务执行: {datetime.now()}")
agent_service.query_article_agent(get_db())
db = SessionLocal()
agent_service.query_article_agent(db)
except Exception as e:
print(f"今日资讯定时任务异常: {e}")
@@ -24,7 +25,8 @@ def recipe_job_task():
"""定时执行的任务"""
try:
print(f"今日菜谱定时任务执行: {datetime.now()}")
agent_service.query_recipe_agent(get_db())
db = SessionLocal()
agent_service.query_recipe_agent(db)
except Exception as e:
print(f"今日菜谱定时任务异常: {e}")