Skip to content

cadence动态配置文件的使用问题 #4384

Answered by Johnite
Johnite asked this question in Q&A
Discussion options

You must be logged in to vote

问题已经解决:
在使用动态配置文件的 时候需要注意两点:
1、静态配置文件中引用动态配置文件的配置格式可能不同,上面我用的是0.20.0版本的cadence-server,对应配置格式:
dynamicConfigClient:
filepath: "config/dynamicconfig/development.yaml"
pollInterval: "10s"

而上面提到的配置:
dynamicconfig:
client: filebased
configstore:
pollInterval: "10s"
updateRetryAttempts: 2
FetchTimeout: "2s"
UpdateTimeout: "2s"
filebased:
filepath: "config/dynamicconfig/development.yaml"
pollInterval: "10s"
在该版本不支持。

2、动态配置文件中的配置格式要符合要求

这样就是不符合要求的
,如果不符合要求会在加载动态配置文件的时候报错:
2021/08/18 19:11:03 Loading config; env=development,zone=,configDir=./config
2021/08/18 19:11:03 Loading configFiles=[./config/base.yaml ./config/development.yaml]
2021/08/18 19:11:03 Loading dynamicconfig; env=development,zone…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by longquanzheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant