enh/refac: deprecate USER_POOL
This commit is contained in:
@@ -90,6 +90,8 @@
|
||||
|
||||
let showRefresh = false;
|
||||
|
||||
let heartbeatInterval = null;
|
||||
|
||||
const BREAKPOINT = 768;
|
||||
|
||||
const setupSocket = async (enableWebsocket) => {
|
||||
@@ -126,6 +128,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Send heartbeat every 30 seconds
|
||||
heartbeatInterval = setInterval(() => {
|
||||
if (_socket.connected) {
|
||||
console.log('Sending heartbeat');
|
||||
_socket.emit('heartbeat', {});
|
||||
}
|
||||
}, 30000);
|
||||
|
||||
if (deploymentId !== null) {
|
||||
WEBUI_DEPLOYMENT_ID.set(deploymentId);
|
||||
}
|
||||
@@ -154,6 +164,12 @@
|
||||
|
||||
_socket.on('disconnect', (reason, details) => {
|
||||
console.log(`Socket ${_socket.id} disconnected due to ${reason}`);
|
||||
|
||||
if (heartbeatInterval) {
|
||||
clearInterval(heartbeatInterval);
|
||||
heartbeatInterval = null;
|
||||
}
|
||||
|
||||
if (details) {
|
||||
console.log('Additional details:', details);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user