chore(services): update components based on recent changes
Changes: services/discord-gateway/src/modules/command-handler/voice.handler.ts | 10 ++++---- services/discord-gateway/src/modules/voice-recording/transmitter.ts | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 72 insertions(+), 29 deletions(-)
This commit is contained in:
@@ -156,10 +156,12 @@ export class VoiceHandler {
|
||||
}
|
||||
|
||||
try {
|
||||
// Reuse shared Redis connection from CommandHandler
|
||||
const transmitRedis =
|
||||
this.sharedRedis ??
|
||||
new (await import("ioredis")).default(config.REDIS_URL);
|
||||
// IMPORTANT: transmitter needs its OWN Redis client because it calls
|
||||
// .subscribe() which converts the connection to subscriber mode. Reusing
|
||||
// the publish connection from CommandHandler would corrupt it and break
|
||||
// every command reply + status update.
|
||||
const { default: IORedis } = await import("ioredis");
|
||||
const transmitRedis = new IORedis(config.REDIS_URL);
|
||||
await voiceTransmitter.start(transmitRedis);
|
||||
|
||||
const status = voiceTransmitter.getStatus();
|
||||
|
||||
Reference in New Issue
Block a user