(
private readonly store: Store,
io: Server,
rpcRegistry: RpcRegistry,
sseManager: SSEManager
)
| 135 | private inactivityTimer: NodeJS.Timeout | null = null |
| 136 | |
| 137 | constructor( |
| 138 | private readonly store: Store, |
| 139 | io: Server, |
| 140 | rpcRegistry: RpcRegistry, |
| 141 | sseManager: SSEManager |
| 142 | ) { |
| 143 | this.eventPublisher = new EventPublisher(sseManager, (event) => this.resolveNamespace(event)) |
| 144 | this.sessionCache = new SessionCache(store, this.eventPublisher) |
| 145 | this.machineCache = new MachineCache(store, this.eventPublisher) |
| 146 | this.messageService = new MessageService( |
| 147 | store, |
| 148 | io, |
| 149 | this.eventPublisher, |
| 150 | (sessionId, updatedAt) => this.recordSessionActivity(sessionId, updatedAt) |
| 151 | ) |
| 152 | this.rpcGateway = new RpcGateway(io, rpcRegistry) |
| 153 | this.reloadAll() |
| 154 | this.inactivityTimer = setInterval(() => this.expireInactive(), 5_000) |
| 155 | } |
| 156 | |
| 157 | stop(): void { |
| 158 | if (this.inactivityTimer) { |
nothing calls this directly
no test coverage detected