refactor(utils): 移除第三方雪花算法依赖,实现自定义Snowflake生成器并修复cronex递归调用问题

This commit is contained in:
1
2025-09-22 14:44:02 +00:00
parent 1a3b212673
commit 55ca29a22e
3 changed files with 160 additions and 10 deletions

View File

@@ -37,10 +37,10 @@ func (c *Cronex) AddFunc(spec string, cmd func()) (node TimerNoder, err error) {
// 运行消费者循环
func (c *Cronex) Run() {
c.Run()
c.Timer.Run()
}
// 关闭cronex的任务循环
func (c *Cronex) Stop() {
c.Stop()
c.Timer.Stop()
}