enh/refac: deprecate USER_POOL
This commit is contained in:
@@ -222,7 +222,7 @@
|
||||
</DropdownMenu.Item>
|
||||
|
||||
{#if showActiveUsers && usage}
|
||||
{#if usage?.user_ids?.length > 0}
|
||||
{#if usage?.user_count}
|
||||
<hr class=" border-gray-50 dark:border-gray-800 my-1 p-0" />
|
||||
|
||||
<Tooltip
|
||||
@@ -250,7 +250,7 @@
|
||||
{$i18n.t('Active Users')}:
|
||||
</span>
|
||||
<span class=" font-semibold">
|
||||
{usage?.user_ids?.length}
|
||||
{usage?.user_count}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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