refac
This commit is contained in:
1 parent
2d2bcb5332
commit
3c1017f6c3
5 files changed
+31
-8
No files matched your search
@@ -16,6 +16,7 @@ from open_webui.env import (
|
||||
GLOBAL_LOG_LEVEL,
|
||||
REDIS_KEY_PREFIX,
|
||||
WEBSOCKET_EVENT_CALLER_TIMEOUT,
|
||||
WEBSOCKET_HEARTBEAT_INTERVAL,
|
||||
WEBSOCKET_MANAGER,
|
||||
WEBSOCKET_REDIS_CLUSTER,
|
||||
WEBSOCKET_REDIS_LOCK_TIMEOUT,
|
||||
@@ -102,7 +103,11 @@ else:
|
||||
|
||||
# Timeout duration in seconds
|
||||
TIMEOUT_DURATION = 3
|
||||
SESSION_POOL_TIMEOUT = 120 # seconds without heartbeat before session is reaped
|
||||
SESSION_POOL_TIMEOUT = (
|
||||
max(WEBSOCKET_HEARTBEAT_INTERVAL * 4, 120)
|
||||
if WEBSOCKET_HEARTBEAT_INTERVAL is not None
|
||||
else 120
|
||||
)
|
||||
|
||||
# Dictionary to maintain the user pool
|
||||
|
||||
|
||||
Reference in new issue
Block a user