This commit is contained in:
cdle
2021-10-29 12:39:16 +08:00
parent 677261fceb
commit cb948599dd
+5 -3
View File
@@ -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) {