dcron
dcron copied to clipboard
[Bug] WithNodeUpdateDuration 会导致首次启动慢
Initial checklist
- [x] I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected packages and versions
0.6.0
Steps to reproduce
nodeUpdateDuration 默认是 3s,每 AddJob 添加一个 job,都会导致 Start 延迟 3s,如果有 100 个定时任务,300s 后才会开始执行,nodeUpdateDuration 设置大一点会更慢
使用 example 执行示例:
Expected behavior
能不能首次启动就能执行任务,nodeUpdateDuration 不影响 Start
Actual behavior
首次执行要等待 nodeUpdateDuration * 任务数
OS
No response
@nxps 我看了下代码,启动时间应该是 nodeUpdateDuration * 节点数量 。