This commit is contained in:
SunSeekerX
2026-01-01 12:42:47 +08:00
parent 666b0120b7
commit d8a33f9aa7
18 changed files with 335 additions and 122 deletions

View File

@@ -18,7 +18,9 @@ class AccountGroupService {
async ensureReverseIndexes() {
try {
const client = redis.getClientSafe()
if (!client) return
if (!client) {
return
}
// 检查是否已迁移
const migrated = await client.get(this.REVERSE_INDEX_MIGRATED_KEY)
@@ -39,10 +41,14 @@ class AccountGroupService {
for (const groupId of allGroupIds) {
const group = await client.hgetall(`${this.GROUP_PREFIX}${groupId}`)
if (!group || !group.platform) continue
if (!group || !group.platform) {
continue
}
const members = await client.smembers(`${this.GROUP_MEMBERS_PREFIX}${groupId}`)
if (members.length === 0) continue
if (members.length === 0) {
continue
}
const pipeline = client.pipeline()
for (const accountId of members) {