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

@ -58,7 +58,7 @@ func TestManualGenerationResolvesAccountModelsAndSnapshotsWithoutGlobalFallbackP
`CREATE TABLE settings(key TEXT PRIMARY KEY,value TEXT)`,
`INSERT INTO settings VALUES('summary_max_articles','50'),('ai_role_summary_provider','legacy-must-not-resolve'),('ai_role_summary_model','legacy-must-not-resolve'),('ai_role_filter_provider','legacy-must-not-resolve')`,
`CREATE TABLE sources(id UUID PRIMARY KEY,name TEXT,type TEXT,enabled BOOLEAN,created_at TIMESTAMPTZ DEFAULT NOW(),article_limit INT,source_key TEXT)`,
`INSERT INTO sources VALUES('00000000-0000-0000-0000-000000001599','Yahoo Finance','stocktwits',true,NOW(),20,'yahoo_finance')`,
`INSERT INTO sources VALUES('00000000-0000-0000-0000-000000001599','Bloomberg','bloomberg',true,NOW(),20,'bloomberg')`,
`CREATE TABLE user_assets(id UUID PRIMARY KEY,user_id UUID,symbol TEXT,name TEXT,figi TEXT,created_at TIMESTAMPTZ DEFAULT NOW())`,
`CREATE TABLE summaries(id UUID PRIMARY KEY,user_id UUID,content TEXT,ai_provider_id UUID,generated_at TIMESTAMPTZ,summary_model_id UUID,provider_name TEXT,model_name TEXT)`,
`CREATE TABLE summary_generations(id UUID PRIMARY KEY,user_id UUID,summary_id UUID,outcome JSONB,created_at TIMESTAMPTZ)`,
@ -81,7 +81,7 @@ func TestManualGenerationResolvesAccountModelsAndSnapshotsWithoutGlobalFallbackP
return &selectionProvider{model: m.Model, calls: providerCalls}, nil
}
pipeline := ai.NewPipeline(repo, nil)
feeds := map[string]scraper.Scraper{models.SourceYahooFinance: feed}
feeds := map[string]scraper.Scraper{models.SourceBloomberg: feed}
useCase := pipeline.NewGenerationUseCaseWithFactory(feeds, laya, factory)
h := handlers.New(repo, &config.Config{}, nil, nil, pipeline, nil)
h.SetGenerationUseCase(useCase)