actually fixed disable schedule filter -_-
This commit is contained in:
parent
45a7738200
commit
cb327f532b
1 changed files with 9 additions and 5 deletions
|
@ -1424,12 +1424,16 @@ 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
|
||||
var cronFilters []Filter
|
||||
web.db.Model(&Filter{}).Where("watch_id = ? AND type = 'cron'", filter.WatchID).Find(&cronFilters)
|
||||
for _, cronFilter := range cronFilters {
|
||||
entryID, exist := web.cronWatch[cronFilter.ID]
|
||||
if !exist {
|
||||
return
|
||||
}
|
||||
web.cron.Remove(entryID)
|
||||
delete(web.cronWatch, filter.ID)
|
||||
}
|
||||
web.cron.Remove(entryID)
|
||||
delete(web.cronWatch, filter.ID)
|
||||
}
|
||||
|
||||
// getFilterResultEcho is a debug filter type, used to bootstrap some tests
|
||||
|
|
Loading…
Add table
Reference in a new issue