Commit e9ca633b authored by 吕先亚's avatar 吕先亚

feat(web): 添加保存推荐数据接口并调整定时任务

- 新增 /franklin/recommend/save接口,用于保存推荐数据- 移除在定时任务中重复的 save_json 调用
parent c5a086a7
......@@ -116,6 +116,10 @@ async def recommend():
else:
return {'msg': '当日投组未产生,待10:30后获取'}
@app.get("/franklin/recommend/save")
async def recommend_save():
await save_json()
return {'msg': '保存成功'}
# 其他异常处理程序
@app.exception_handler(Exception)
......@@ -137,7 +141,6 @@ async def startup_event():
if current_time.time() > target_time:
scheduler.add_job(main.start, trigger=DateTrigger(run_date=current_time))
# await send_email()
await save_json()
# 开启定时任务,执行实盘
scheduler.add_job(main.start, 'cron', day=1, hour=10, minute=25)
scheduler.add_job(send_email, 'cron', day=1, hour=10, minute=25)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment