Merge branch 'refs/heads/feat-cid'

This commit is contained in:
junleea 2024-11-06 21:56:35 +08:00
commit 021c475720
1 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ func RunCron() {
//如果没有定时任务查找数据库是否有定时任务如果有则加入redis如果没有则不做任何操作 //如果没有定时任务查找数据库是否有定时任务如果有则加入redis如果没有则不做任何操作
key := "cron_cid_runs" key := "cron_cid_runs"
res := worker.GetRedis(key) res := worker.GetRedis(key)
fmt.Println("cid run cron res:", res) //fmt.Println("cid run cron res:", res)
if res == "" { if res == "" {
cids := dao.FindCIDByTime() cids := dao.FindCIDByTime()
cid_workers := make([]proto.CIDRUN, 0) cid_workers := make([]proto.CIDRUN, 0)
@ -255,7 +255,7 @@ func RunCron() {
if err != nil { if err != nil {
fmt.Println("json unmarshal failed") fmt.Println("json unmarshal failed")
} }
fmt.Println("cid_workers:", cid_workers) //fmt.Println("cid_workers:", cid_workers)
for i, v := range cid_workers { for i, v := range cid_workers {
//查找定时任务 //查找定时任务
if v.Curr-10 <= 0 { if v.Curr-10 <= 0 {