feat(task): 后台任务改为apscheduler执行

This commit is contained in:
xingc
2025-05-12 20:08:50 +08:00
parent eec9d3048c
commit 680c5c2b63
9 changed files with 74 additions and 11 deletions

View File

@@ -87,7 +87,7 @@ async def get_current_user_form_ws(
"""在ws headers中提取token并验证再获取当前用户"""
auth_header = websocket.headers.get("authorization") or websocket.headers.get("Authorization")
if auth_header and auth_header.lower().startswith("bearer "):
token = auth_header.removeprefix("Bearer ").strip()
token = auth_header.removeprefix("bearer ").strip()
else:
token = ''
user = await get_current_user(token, db_session, redis_conn)