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")
|
web.db.Model(&Filter{}).Where("watch_id = ? AND type = 'cron'", filter.WatchID).Update("Var2", "no")
|
||||||
|
|
||||||
entryID, exist := web.cronWatch[filter.ID]
|
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 {
|
if !exist {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
web.cron.Remove(entryID)
|
web.cron.Remove(entryID)
|
||||||
delete(web.cronWatch, filter.ID)
|
delete(web.cronWatch, filter.ID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// getFilterResultEcho is a debug filter type, used to bootstrap some tests
|
// getFilterResultEcho is a debug filter type, used to bootstrap some tests
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue