From b7ad7ae90cd832281afe6d743776ad87f1e56e07 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期五, 03 一月 2025 16:55:47 +0800 Subject: [PATCH] 工作流日志 --- app/config/config.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/app/config/config.py b/app/config/config.py index 271c588..c5a10a0 100644 --- a/app/config/config.py +++ b/app/config/config.py @@ -1,3 +1,4 @@ +import os from pathlib import Path import yaml @@ -17,7 +18,21 @@ PASSWORD_KEY: str basic_base_url: str = '' basic_paper_url: str = '' + dify_base_url: str = '' + dify_api_token: str = '' + dify_workflow_clean: str = '' + dify_workflow_report: str = '' + postgresql_database_url: str = '' def __init__(self, **kwargs): + # 鏇挎崲閰嶇疆涓殑IP鍦板潃 + host_ip = os.getenv('HOST_IP', '127.0.0.1') + kwargs['sgb_base_url'] = kwargs.get('sgb_base_url', '').replace('127.0.0.1', host_ip) + kwargs['sgb_websocket_url'] = kwargs.get('sgb_websocket_url', '').replace('127.0.0.1', host_ip) + kwargs['fwr_base_url'] = kwargs.get('fwr_base_url', '').replace('127.0.0.1', host_ip) + kwargs['sgb_db_url'] = kwargs.get('sgb_db_url', '').replace('127.0.0.1', host_ip) + kwargs['fwr_db_url'] = kwargs.get('fwr_db_url', '').replace('127.0.0.1', host_ip) + # kwargs['dify_base_url'] = kwargs.get('dify_base_url', '').replace('127.0.0.1', host_ip) + kwargs['basic_base_url'] = kwargs.get('basic_base_url', '').replace('127.0.0.1', host_ip) # Check if all required fields are provided and set them for field in self.__annotations__.keys(): if field not in kwargs: -- Gitblit v1.8.0