添加自动备注日志

This commit is contained in:
2025-12-12 10:48:36 +08:00
parent db956e2487
commit 9c298928f3

5
app.py
View File

@@ -2118,8 +2118,9 @@ def run_task(user_id, account_id, browse_type, enable_screenshot=True, source="m
account.remark = real_name account.remark = real_name
database.update_account_remark(account_id, real_name) database.update_account_remark(account_id, real_name)
socketio.emit('account_update', account.to_dict(), room=f'user_{user_id}') socketio.emit('account_update', account.to_dict(), room=f'user_{user_id}')
except Exception: logger.info(f"[自动备注] 账号 {account.username} 自动设置备注为: {real_name}")
pass # 静默失败,不影响任务执行 except Exception as e:
logger.warning(f"[自动备注] 获取姓名失败: {e}")
if account_id in task_status: if account_id in task_status:
task_status[account_id]["detail_status"] = "正在浏览" task_status[account_id]["detail_status"] = "正在浏览"