Gateway: dont block on clearing voice states
Some checks failed
Build docker images / build (api) (push) Failing after 1m9s
Build docker images / build (cdn) (push) Failing after 1m20s
Build docker images / build (admin-api) (push) Failing after 4m7s
Build docker images / build (cdn-cs) (push) Failing after 1m50s
Build docker images / build (gateway) (push) Failing after 1m28s
Build / build (24.x) (push) Successful in 2m42s
Nix build / build-nix (push) Failing after 5m17s
Build docker images / build (gateway-offload) (push) Failing after 1m20s
Build docker images / build (default) (push) Failing after 5m30s
Style / build (24.x) (push) Failing after 2m18s

This commit is contained in:
Rory&
2026-02-16 21:40:49 +01:00
parent 43b2e3ea93
commit 0c384cf4e9
2 changed files with 4 additions and 8 deletions

View File

@@ -171,12 +171,9 @@ export class Server {
await Config.init();
await initEvent();
// temporary fix
console.log("[Gateway] Clearing voice states");
await cleanupOnStartup();
console.log("[Gateway] dbg checking if server is listening");
if (!this.server.listening) {
console.log("gonna start listening on", this.port);
this.server.listen(this.port);
console.log(`[Gateway] online on 0.0.0.0:${this.port}`);
}

View File

@@ -53,9 +53,8 @@ export async function cleanupOnStartup(): Promise<void> {
// },
//);
try {
await VoiceState.clear();
} catch (e) {
console.error("Error clearing voice states on startup:", e);
}
console.log("[Gateway] Starting async voice state wipe...");
VoiceState.clear()
.then((e) => console.log("[Gateway] Successfully cleaned voice states"))
.catch((e) => console.error("[Gateway] Error cleaning voice states on startup:", e));
}