feat: 新增Token批量选择及批量禁用、优化请求日志进度输出、新增Token批量修改代理功能

refactor: 移除Sora2激活码相关功能
This commit is contained in:
TheSmallHanCat
2026-01-16 12:08:40 +08:00
parent 27ed2bd9a7
commit eadce1a131
4 changed files with 303 additions and 171 deletions

View File

@@ -917,7 +917,17 @@ class Database:
query = f"UPDATE request_logs SET {', '.join(updates)} WHERE id = ?"
await db.execute(query, params)
await db.commit()
async def update_request_log_task_id(self, log_id: int, task_id: str):
"""Update request log with task_id"""
async with aiosqlite.connect(self.db_path) as db:
await db.execute("""
UPDATE request_logs
SET task_id = ?, updated_at = CURRENT_TIMESTAMP
WHERE id = ?
""", (task_id, log_id))
await db.commit()
async def get_recent_logs(self, limit: int = 100) -> List[dict]:
"""Get recent logs with token email"""
async with aiosqlite.connect(self.db_path) as db: