enh/refac: deprecate USER_POOL

This commit is contained in:
Timothy Jaeryang Baek
2025-11-28 07:39:02 -05:00
parent c2634d45ad
commit 70948f8803
10 changed files with 50 additions and 88 deletions
@@ -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>
+16
View File
@@ -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);
}