add namespace MDRS_CLIENT to customizable enviroment variables.

This commit is contained in:
Yoshihiro OKUMURA 2023-05-11 19:01:07 +09:00
parent 5c41ed041d
commit 5a5beb5645
Signed by: orrisroot
GPG Key ID: 470AA444C92904B2
3 changed files with 8 additions and 8 deletions

View File

@ -1,2 +1,2 @@
# CONFIG_DIRNAME="~/.mdrs-client" # MDRS_CLIENT_CONFIG_DIRNAME="~/.mdrs-client"
# CONCURRENT=10 # MDRS_CLIENT_CONCURRENT=10

View File

@ -13,8 +13,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
// Extensions - Code Spell Checker // Extensions - Code Spell Checker
"cSpell.ignoreWords": ["getframe", "pydantic"], "cSpell.ignoreWords": ["getframe", "pydantic", "UNLCK"],
"cSpell.words": ["mdrs", "mdrsclient", "neurodata", "chacl", "Neuroinformatics", "RIKEN"], "cSpell.words": ["chacl", "mdrs", "mdrsclient", "neurodata", "Neuroinformatics", "RIKEN"],
// Extensions - isort // Extensions - isort
"isort.args": ["--profile=black"], "isort.args": ["--profile=black"],
// Extensions - Prettier // Extensions - Prettier

View File

@ -4,8 +4,8 @@ from pydantic import BaseSettings
class Settings(BaseSettings): class Settings(BaseSettings):
config_dirname: str = "~/.mdrs-client" mdrs_client_config_dirname: str = "~/.mdrs-client"
concurrent: int = 10 mdrs_client_concurrent: int = 10
class Config: class Config:
env_file = ".env" env_file = ".env"
@ -14,5 +14,5 @@ class Settings(BaseSettings):
settings = Settings() settings = Settings()
CONCURRENT = settings.concurrent CONCURRENT = settings.mdrs_client_concurrent
CONFIG_DIRNAME = os.path.realpath(os.path.expanduser(settings.config_dirname)) CONFIG_DIRNAME = os.path.realpath(os.path.expanduser(settings.mdrs_client_config_dirname))