@mulingai-npm/redis 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -134,23 +134,16 @@ class MulingstreamSpeakerManager {
|
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
136
|
async getSpeakersByRoomId(roomId) {
|
|
137
|
-
console.log(`🔍 [getSpeakersByRoomId] Looking for speakers in room: ${roomId}`);
|
|
138
137
|
const ids = await this.redisClient.smembers(`room:${roomId}:speakers`);
|
|
139
|
-
console.log(`🔍 [getSpeakersByRoomId] Found speaker IDs in room index:`, ids);
|
|
140
138
|
const result = [];
|
|
141
139
|
for (const id of ids) {
|
|
142
|
-
console.log(`🔍 [getSpeakersByRoomId] Processing speaker ID: ${id}`);
|
|
143
140
|
const key = this.buildKey(id);
|
|
144
|
-
console.log(`🔍 [getSpeakersByRoomId] Generated key: ${key}`);
|
|
145
141
|
const hash = await this.redisClient.hgetall(key);
|
|
146
|
-
console.log(`🔍 [getSpeakersByRoomId] Retrieved hash for ${id}:`, hash);
|
|
147
142
|
if (hash !== null && Object.keys(hash).length > 0) {
|
|
148
143
|
const parsedSpeaker = this.parseHash(hash);
|
|
149
|
-
console.log(`✅ [getSpeakersByRoomId] Successfully parsed speaker:`, parsedSpeaker);
|
|
150
144
|
result.push(parsedSpeaker);
|
|
151
145
|
}
|
|
152
146
|
else {
|
|
153
|
-
console.log(`⚠️ [getSpeakersByRoomId] Speaker ${id} not found or empty, cleaning indexes`);
|
|
154
147
|
await this.cleanIndexes(id);
|
|
155
148
|
}
|
|
156
149
|
}
|