newsbot-api/internal/services/cron/rss.go

35 lines
604 B
Go
Raw Permalink Normal View History

package cron
import (
"log"
"git.jamestombleson.com/jtom38/newsbot-api/internal/domain"
)
func (c *Cron) LoadRssQueue() {
sources, err := c.repo.Sources.ListBySource(*c.ctx, 0, 1000, domain.SourceCollectorRss)
if err != nil {
log.Println(err)
}
for _, source := range sources {
if !source.Enabled {
continue
}
}
}
func (c *Cron) ListAllSourceRecords(sourceType string) ([]domain.SourceEntity, error) {
var records []domain.SourceEntity
sources, err := c.repo.Sources.ListBySource(*c.ctx, 0, 1000, sourceType)
if err != nil {
return records, err
}
return sources, nil
}