refac
This commit is contained in:
@@ -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