This commit is contained in:
Timothy Jaeryang Baek
2025-08-17 04:06:16 +04:00
parent bed6aa63e1
commit 7f0c50f445
3 changed files with 15 additions and 8 deletions

View File

@@ -4,10 +4,10 @@ from typing import Optional
from open_webui.internal.db import Base, JSONField, get_db
from open_webui.env import DATABASE_DEDUPLICATE_INTERVAL
from open_webui.env import DATABASE_USER_ACTIVE_STATUS_UPDATE_INTERVAL
from open_webui.models.chats import Chats
from open_webui.models.groups import Groups
from open_webui.utils.misc import deduplicate
from open_webui.utils.misc import throttle
from pydantic import BaseModel, ConfigDict
@@ -313,7 +313,7 @@ class UsersTable:
except Exception:
return None
@deduplicate(DATABASE_DEDUPLICATE_INTERVAL)
@throttle(DATABASE_USER_ACTIVE_STATUS_UPDATE_INTERVAL)
def update_user_last_active_by_id(self, id: str) -> Optional[UserModel]:
try:
with get_db() as db: