some startup prints

This commit is contained in:
BroodjeAap 2022-10-07 17:19:23 +00:00
parent e97a9b7a82
commit 43814652f3

View file

@ -88,7 +88,6 @@ func (web *Web) initTemplates() {
func (web *Web) initCronJobs() {
var cronFilters []Filter
log.Println(web.db, cronFilters)
web.db.Model(&Filter{}).Find(&cronFilters, "type = 'cron'")
web.cronWatch = make(map[uint]cron.Entry, len(cronFilters))
web.cron = cron.New()
@ -98,6 +97,7 @@ func (web *Web) initCronJobs() {
log.Println("Could not start job for Watch: ", cronFilter.WatchID)
continue
}
log.Println("Started CronJob for WatchID", cronFilter.WatchID, "with schedule:", cronFilter.Var1)
web.cronWatch[cronFilter.WatchID] = web.cron.Entry(entryID)
}
web.cron.Start()