From cb948599dd5c4d6526e98d09ad539aae9437ed41 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Fri, 29 Oct 2021 12:39:16 +0800 Subject: [PATCH] update --- develop/qinglong/cron.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/develop/qinglong/cron.go b/develop/qinglong/cron.go index cde4227..1ceab92 100644 --- a/develop/qinglong/cron.go +++ b/develop/qinglong/cron.go @@ -195,9 +195,7 @@ func init() { if Config.Host == "" { return nil } - // if s.GetImType() == "fake" && qinglong.GetBool("autoCronHideDuplicate", true) == false { - // return nil - // } + w := func(s string) int { if strings.Contains(s, "cdle") { return 20 @@ -234,6 +232,10 @@ func init() { Config.Req(CRONS, PUT, "/disable", []byte(fmt.Sprintf(`["%s"]`, crons[i].ID))) continue } + if s.GetImType() == "fake" && qinglong.GetBool("autoCronHideDuplicate", true) == false { + // return nil + continue + } if task, ok := tasks[crons[i].Name]; ok { var dup Cron if w(task.Command) > w(crons[i].Command) {