feat(server): use job system (#10218)

This commit is contained in:
forehalo
2025-02-18 05:41:57 +00:00
parent cb895d4cb0
commit da67c78152
15 changed files with 124 additions and 281 deletions

View File

@@ -152,13 +152,13 @@ export class SpaceSyncGateway
handleConnection() {
this.connectionCount++;
this.logger.log(`New connection, total: ${this.connectionCount}`);
metrics.socketio.gauge('realtime_connections').record(this.connectionCount);
metrics.socketio.gauge('connections').record(1);
}
handleDisconnect() {
this.connectionCount--;
this.logger.log(`Connection disconnected, total: ${this.connectionCount}`);
metrics.socketio.gauge('realtime_connections').record(this.connectionCount);
metrics.socketio.gauge('connections').record(-1);
}
selectAdapter(client: Socket, spaceType: SpaceType): SyncSocketAdapter {