feat: add feature to speak with the AI and create report from contexts
This commit is contained in:
@ -72,11 +72,11 @@ func (r *Registry) Run(sourceID string) error {
|
||||
return scrapeErr
|
||||
}
|
||||
|
||||
// Persister les articles
|
||||
// Persister uniquement les nouveaux articles
|
||||
count := 0
|
||||
for _, a := range articles {
|
||||
saved, err := r.repo.UpsertArticle(sourceID, a.Title, a.Content, a.URL, a.PublishedAt)
|
||||
if err != nil {
|
||||
saved, isNew, err := r.repo.InsertArticleIfNew(sourceID, a.Title, a.Content, a.URL, a.PublishedAt)
|
||||
if err != nil || !isNew {
|
||||
continue
|
||||
}
|
||||
count++
|
||||
|
||||
Reference in New Issue
Block a user