add environment_variables (#6385)

This commit is contained in:
luukunn
2026-02-09 15:29:49 +08:00
committed by GitHub
parent eb8d639fe3
commit fd56d85346
2 changed files with 32 additions and 1 deletions
+16
View File
@@ -227,5 +227,21 @@ environment_variables: dict[str, Callable[[], Any]] = {
# Worker process health check timeout when waiting for responses in seconds (default: 30)
"FD_WORKER_ALIVE_TIMEOUT": lambda: int(os.getenv("FD_WORKER_ALIVE_TIMEOUT", "30")),
# Whether to collect user information, default 0 (collect); 1 (do not collect)
"DO_NOT_TRACK" : lambda: (os.getenv("DO_NOT_TRACK", "0")) == "1",
# Usage statistics report server address
"FD_USAGE_STATS_SERVER": lambda: os.getenv(
"FD_USAGE_STATS_SERVER", "http://fd-stats.baidu-int.com/fd/report/periodic"
),
# Usage statistics source information, can be set by user
"FD_USAGE_SOURCE": lambda: os.getenv("FD_USAGE_SOURCE", "Unknown"),
# FastDeploy configuration root directory
"FD_CONFIG_ROOT": lambda: os.path.expanduser(
os.getenv("FD_CONFIG_ROOT", os.path.join(os.path.expanduser("~"), ".config", "fastdeploy"))
),
}
```
+16 -1
View File
@@ -227,5 +227,20 @@ environment_variables: dict[str, Callable[[], Any]] = {
# Worker 进程响应等待时的健康检查超时时间(秒),默认 30 秒
"FD_WORKER_ALIVE_TIMEOUT": lambda: int(os.getenv("FD_WORKER_ALIVE_TIMEOUT", "30")),
# 控制是否收集用户信息,默认 0(收集);1(不收集)
"DO_NOT_TRACK" : lambda: (os.getenv("DO_NOT_TRACK", "0")) == "1",
# 使用情况统计报告服务地址
"FD_USAGE_STATS_SERVER": lambda: os.getenv(
"FD_USAGE_STATS_SERVER", "http://fd-stats.baidu-int.com/fd/report/periodic"
),
# 使用情况统计的来源信息,用户可主动设置
"FD_USAGE_SOURCE": lambda: os.getenv("FD_USAGE_SOURCE", "Unknown"),
# FastDeploy 配置根目录
"FD_CONFIG_ROOT": lambda: os.path.expanduser(
os.getenv("FD_CONFIG_ROOT", os.path.join(os.path.expanduser("~"), ".config", "fastdeploy"))
),
}
```