feat(sources): retire Yahoo and CNBC feeds (#42)

This commit is contained in:
2026-11-25 02:00:25 +01:00
parent 7a342f240d
commit 0503c2653f
41 changed files with 603 additions and 173 deletions

View File

@ -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 {