diff --git a/joint_teapot/config.py b/joint_teapot/config.py index c65a745..027140e 100644 --- a/joint_teapot/config.py +++ b/joint_teapot/config.py @@ -20,6 +20,7 @@ class Settings(BaseSettings): gitea_suffix: str = "/git" gitea_access_token: str = "" gitea_org_name: str = "" + gitea_debug: bool = False # git git_host: str = "ssh://git@focs.ji.sjtu.edu.cn:2222" diff --git a/joint_teapot/workers/gitea.py b/joint_teapot/workers/gitea.py index 114a0ff..337668b 100644 --- a/joint_teapot/workers/gitea.py +++ b/joint_teapot/workers/gitea.py @@ -53,7 +53,7 @@ def __init__( configuration = focs_gitea.Configuration() configuration.api_key["access_token"] = access_token configuration.host = f"https://{domain_name}{suffix}/api/v1" - configuration.debug = True + configuration.debug = settings.gitea_debug for v in configuration.logger.values(): v.handlers = [] self.api_client = focs_gitea.ApiClient(configuration)