deploy: auto commit repo-root changes 2026-06-13 00:33:38

This commit is contained in:
hajimi
2026-06-13 00:33:38 +08:00
parent c3385b0e04
commit 186521392d
2 changed files with 52 additions and 7 deletions
+3 -7
View File
@@ -625,15 +625,10 @@ class AiCommentRepository:
for index in range(1, target_count + 1):
persona = self._persona_for_index(index)
account = f"{BOT_ACCOUNT_PREFIX}{index:04d}"
nickname = self._build_bot_nickname(index)
row = indexed.get(index)
if row:
if row["nickname"] != nickname:
cursor.execute(
f"UPDATE `{self.prefix}user` SET nickname=%s, update_time=%s WHERE id=%s",
(nickname, now, row["id"]),
)
continue
nickname = self._build_bot_nickname(index)
password = self._create_password(self._random_password(), salt)
sn = self._create_user_sn(cursor)
cursor.execute(
@@ -651,7 +646,8 @@ class AiCommentRepository:
for row in rows:
index = self._parse_account_index(row["account"])
persona = self._persona_for_index(index)
users.append(VirtualUser(int(row["id"]), row["account"], self._build_bot_nickname(index), persona["key"]))
nickname = str(row.get("nickname") or "").strip() or self._build_bot_nickname(index)
users.append(VirtualUser(int(row["id"]), row["account"], nickname, persona["key"]))
self._virtual_users_cache = list(users)
return users[:target_count]