fix(scraper): verify complete article evidence (#40)
This commit is contained in:
@ -29,6 +29,7 @@ type Candidate struct {
|
||||
orderFrozen bool
|
||||
}
|
||||
type SourceStat struct {
|
||||
SourceKey string `json:"source_key"`
|
||||
ContentComplete int `json:"content_complete"`
|
||||
ContentIncomplete int `json:"content_incomplete"`
|
||||
ContentUnavailable int `json:"content_unavailable"`
|
||||
@ -206,7 +207,7 @@ func (u *useCase) Generate(ctx context.Context, userID string) (Result, error) {
|
||||
if !source.Operational() {
|
||||
continue
|
||||
}
|
||||
stat := SourceStat{SourceID: source.ID, SourceType: source.Type, ArticleLimit: source.ArticleLimit, Status: "ok"}
|
||||
stat := SourceStat{SourceKey: *source.SourceKey, SourceID: source.ID, SourceType: source.Type, ArticleLimit: source.ArticleLimit, Status: "ok"}
|
||||
if stat.ArticleLimit <= 0 {
|
||||
stat.ArticleLimit = 20
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user