feat: add monitoring marked articles and retention updates
This commit is contained in:
@@ -72,6 +72,24 @@ func (s *DesktopTaskService) syncMonitoringArticleAlias(ctx context.Context, inp
|
||||
nullableString(lastPathSegment),
|
||||
confidence,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if confidence == "high" {
|
||||
_, err = s.monitoringPool.Exec(ctx, `
|
||||
UPDATE monitoring_citation_facts
|
||||
SET content_source_type = 'published_article',
|
||||
content_source_id = $3,
|
||||
article_id = COALESCE(article_id, $3),
|
||||
publish_record_id = COALESCE(publish_record_id, $4)
|
||||
WHERE tenant_id = $1
|
||||
AND normalized_url = $2
|
||||
AND (
|
||||
content_source_type IS DISTINCT FROM 'published_article'
|
||||
OR content_source_id IS DISTINCT FROM $3
|
||||
)
|
||||
`, input.TenantID, normalizedURL, input.ArticleID, input.PublishRecordID)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user