Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何拿到配置的修改时间? #5

Open
jianglin-wu opened this issue Mar 4, 2019 · 2 comments
Open

请问如何拿到配置的修改时间? #5

jianglin-wu opened this issue Mar 4, 2019 · 2 comments

Comments

@jianglin-wu
Copy link

请问如何拿到配置的修改时间?

我希望将 Disconf 配置生成到 web 程序 js 中,文件名包含文件修改时间戳,避免文件被缓存。

@Corey600
Copy link
Owner

node-disconf-client 暂时没有这样的 feature 哈。

本地监听配置被修改实际是监听 zookeeper 节点的事件的,你看看 zookeeper 节点上有没有修改时间信息,或者从目标服务器取完整配置的时候看看能否取到修改时间。

或者如果只是为了避免缓存,监听到配置修改的时候直接取一个当前时间戳也行。

欢迎直接提交PR哈~

@jianglin-wu
Copy link
Author

好的,感谢您贡献的代码🙏,目前正在使用这个依赖包。准备推广到整个公司,将项目配置脱离 git 版本控制,如果有必要也会提交 PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants