-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add confd.watch
option, default as true
.
#826
Conversation
Warning Rate limit exceeded@huangdijia has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 56 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
概述演练此次更改主要涉及配置文件和监听器的修改,以增强环境变量监控功能。在 变更
诗歌
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/confd/src/Listener/WatchOnBootListener.php (1)
46-49
: 建议添加调试日志当监听功能被禁用时,建议添加调试日志以便于问题排查。
建议修改如下:
if (! $this->config->get('confd.watch', true)) { + $this->logger?->debug('[confd] Watching is disabled by configuration.'); return; }
src/confd/publish/confd.php (1)
69-75
: 建议完善配置文档当前的配置注释较为简单,建议:
- 为
watches
数组添加更详细的说明,包括配置格式和用途- 为
interval
添加单位说明(秒/毫秒)建议修改注释如下:
- // Watch keys + // 需要监听的环境变量列表 + // 当这些变量发生变化时会触发更新 'watches' => [ 'DB_HOST', ], - // Watch interval + // 配置检查间隔时间(秒) + // 系统会按照此间隔定期检查配置变更 'interval' => 1,
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/confd/publish/confd.php
(1 hunks)src/confd/src/Listener/WatchOnBootListener.php
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: Test on PHP 8.1 with Swoole 6.0.0
- GitHub Check: Test on PHP 8.1 with Swoole 5.1.6
- GitHub Check: Test on PHP 8.2 with Swoole 6.0.0
- GitHub Check: Test on PHP 8.2 with Swoole 5.1.6
- GitHub Check: Test on PHP 8.3 with Swoole 6.0.0
- GitHub Check: Test on PHP 8.3 with Swoole 5.1.6
- GitHub Check: Test on PHP 8.1 with Swoole 6.0.0
- GitHub Check: Test on PHP 8.1 with Swoole 5.1.6
- GitHub Check: Test on PHP 8.2 with Swoole 5.1.6
- GitHub Check: Test on PHP 8.3 with Swoole 6.0.0
- GitHub Check: Test on PHP 8.3 with Swoole 5.1.6
🔇 Additional comments (2)
src/confd/src/Listener/WatchOnBootListener.php (1)
16-16
: 依赖注入实现正确!构造函数的依赖注入实现符合最佳实践,参数顺序合理。
Also applies to: 26-29
src/confd/publish/confd.php (1)
66-67
: 配置项设计合理!通过环境变量控制监听功能的实现方式符合最佳实践,默认值设置合理。
friendsofhyperf/confd#2
Summary by CodeRabbit
新功能
配置变更
CONFD_WATCH
环境变量控制监控状态