From c292fd89f9f6164e450818d696ca20f6eef26b6d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 22 Sep 2024 02:55:45 +0200 Subject: [PATCH] refac --- backend/open_webui/apps/socket/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/apps/socket/main.py b/backend/open_webui/apps/socket/main.py index e84ce18bb..7883b7d8b 100644 --- a/backend/open_webui/apps/socket/main.py +++ b/backend/open_webui/apps/socket/main.py @@ -69,7 +69,6 @@ TIMEOUT_DURATION = 3 async def periodic_usage_pool_cleanup(): while True: now = int(time.time()) - log.debug(f"Cleaning up usage pool: {now}") for model_id, connections in list(USAGE_POOL.items()): # Creating a list of sids to remove if they have timed out expired_sids = [ @@ -82,6 +81,7 @@ async def periodic_usage_pool_cleanup(): del connections[sid] if not connections: + log.debug(f"Cleaning up model {model_id} from usage pool") del USAGE_POOL[model_id] else: USAGE_POOL[model_id] = connections