feat(sources): retire Yahoo and CNBC feeds (#42)
This commit is contained in:
@ -15,7 +15,7 @@ type personalInputs struct {
|
||||
}
|
||||
|
||||
func (p *personalInputs) LoadUserInput(_ context.Context, id string) (generation.UserInput, error) {
|
||||
key := models.SourceYahooFinance
|
||||
key := models.SourceBloomberg
|
||||
input := generation.UserInput{Language: "en", RankingMode: "title", GlobalLimit: 20, Sources: []models.Source{{ID: "source", Enabled: true, SourceKey: &key, ArticleLimit: 20}}}
|
||||
if id != "account-a" {
|
||||
model := "model-b"
|
||||
@ -45,7 +45,7 @@ func (personalSummary) Summarize(context.Context, string, []models.UserAsset, []
|
||||
func TestSchedulerActualUseCaseSkipsCollectionForUnselectedAccount(t *testing.T) {
|
||||
repo := &personalInputs{saved: map[string]generation.GenerationRecord{}}
|
||||
feed := &ticket13Feed{}
|
||||
uc := generation.NewUseCase(generation.Dependencies{Repository: repo, Scrapers: map[string]scraper.Scraper{models.SourceYahooFinance: feed}, LayaRanker: ticket13Ranker{}, SummaryResolver: personalResolver{}})
|
||||
uc := generation.NewUseCase(generation.Dependencies{Repository: repo, Scrapers: map[string]scraper.Scraper{models.SourceBloomberg: feed}, LayaRanker: ticket13Ranker{}, SummaryResolver: personalResolver{}})
|
||||
s := &Scheduler{users: twoPersonalModelUsers{}, generationUseCase: uc}
|
||||
s.run()
|
||||
if feed.calls != 1 || repo.saved["account-a"].Outcome.FailureCode != "summary_model_unavailable" || repo.saved["account-a"].Summary != nil {
|
||||
|
||||
Reference in New Issue
Block a user