deploy: auto commit repo-root changes 2026-06-13 00:33:38
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user