From 54503b7e1b833fd184af100c3986e7709895b78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Sat, 28 Jan 2023 19:10:03 +0100 Subject: [PATCH] reduce userstats cron defaults, fix reference error --- backend/oasst_backend/config.py | 6 +++--- backend/oasst_backend/prompt_repository.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/oasst_backend/config.py b/backend/oasst_backend/config.py index 5c566b1e..12cd3e89 100644 --- a/backend/oasst_backend/config.py +++ b/backend/oasst_backend/config.py @@ -179,9 +179,9 @@ class Settings(BaseSettings): tree_manager: Optional[TreeManagerConfiguration] = TreeManagerConfiguration() - USER_STATS_INTERVAL_DAY: int = 15 # minutes - USER_STATS_INTERVAL_WEEK: int = 60 # minutes - USER_STATS_INTERVAL_MONTH: int = 120 # minutes + USER_STATS_INTERVAL_DAY: int = 5 # minutes + USER_STATS_INTERVAL_WEEK: int = 15 # minutes + USER_STATS_INTERVAL_MONTH: int = 60 # minutes USER_STATS_INTERVAL_TOTAL: int = 240 # minutes @validator( diff --git a/backend/oasst_backend/prompt_repository.py b/backend/oasst_backend/prompt_repository.py index c69f7340..50808285 100644 --- a/backend/oasst_backend/prompt_repository.py +++ b/backend/oasst_backend/prompt_repository.py @@ -481,6 +481,7 @@ class PromptRepository: task_id=task.id if task else None, ) + message: Message = None if message_id: if not task: if text_labels.is_report is True: