disable schedules filter now also stops running schedules

This commit is contained in:
BroodjeAap 2023-05-10 19:34:35 +00:00
parent 384ef6ebfc
commit 45a7738200

View file

@ -1423,6 +1423,13 @@ func getFilterResultDisableSchedules(filter *Filter, web *Web, debug bool) {
}
web.db.Model(&Filter{}).Where("watch_id = ? AND type = 'cron'", filter.WatchID).Update("Var2", "no")
entryID, exist := web.cronWatch[filter.ID]
if !exist {
return
}
web.cron.Remove(entryID)
delete(web.cronWatch, filter.ID)
}
// getFilterResultEcho is a debug filter type, used to bootstrap some tests