FEAT: added a prometheus gauge for the number of active rooms
This commit is contained in:
parent
6c6d046891
commit
b064f01f97
2 changed files with 14 additions and 0 deletions
|
@ -351,6 +351,7 @@ export class SocketManager {
|
|||
world.leave(Client);
|
||||
if (world.isEmpty()) {
|
||||
this.Worlds.delete(Client.roomId);
|
||||
gaugeManager.decNbRoomGauge();
|
||||
}
|
||||
}
|
||||
//user leave previous room
|
||||
|
@ -383,6 +384,7 @@ export class SocketManager {
|
|||
world.tags = data.tags
|
||||
world.policyType = Number(data.policy_type)
|
||||
}
|
||||
gaugeManager.incNbRoomGauge();
|
||||
this.Worlds.set(roomId, world);
|
||||
}
|
||||
return Promise.resolve(world)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue