removed crossplatformcompany from types

This commit is contained in:
2026-01-14 14:49:00 +01:00
parent 93fbefc9d4
commit f4b20f824d
8 changed files with 83 additions and 87 deletions

View File

@@ -29,7 +29,7 @@ enum LogCommand {
/// Type alias for enrichment function
type EnrichmentFn = Arc<
dyn Fn(CompanyCrossPlatformData, Arc<YahooClientPool>, DataPaths)
dyn Fn(CompanyData, Arc<YahooClientPool>, DataPaths)
-> Pin<Box<dyn Future<Output = anyhow::Result<()>> + Send>>
+ Send
+ Sync
@@ -104,7 +104,7 @@ pub async fn enrich_companies_with_events(
logger::log_info(&format!("Found {} companies to process", total_companies)).await;
// Filter companies that need enrichment
let pending_companies: Vec<CompanyCrossPlatformData> = companies
let pending_companies: Vec<CompanyData> = companies
.into_iter()
.filter(|company| !enriched_companies.contains(&company.name))
.collect();
@@ -283,7 +283,7 @@ async fn track_events_completion(
/// Enrich a single company with event data
async fn enrich_company_with_events(
company: &CompanyCrossPlatformData,
company: &CompanyData,
yahoo_pool: &Arc<YahooClientPool>,
paths: &DataPaths,
) -> anyhow::Result<()> {
@@ -438,7 +438,7 @@ pub async fn enrich_companies_with_option(
logger::log_info(&format!("Found {} companies to process", total_companies)).await;
// Filter companies that need enrichment
let pending_companies: Vec<CompanyCrossPlatformData> = companies
let pending_companies: Vec<CompanyData> = companies
.into_iter()
.filter(|company| !enriched_companies.contains(&company.name))
.collect();
@@ -605,7 +605,7 @@ async fn track_option_completion(
/// Enrich a single company with option data
async fn enrich_company_with_option(
company: &CompanyCrossPlatformData,
company: &CompanyData,
yahoo_pool: &Arc<YahooClientPool>,
paths: &DataPaths,
) -> anyhow::Result<()> {
@@ -697,7 +697,7 @@ pub async fn enrich_companies_with_chart(
logger::log_info(&format!("Found {} companies to process", total_companies)).await;
// Filter companies that need enrichment
let pending_companies: Vec<CompanyCrossPlatformData> = companies
let pending_companies: Vec<CompanyData> = companies
.into_iter()
.filter(|company| !enriched_companies.contains(&company.name))
.collect();
@@ -864,7 +864,7 @@ async fn track_chart_completion(
/// Enrich a single company with chart data
async fn enrich_company_with_chart(
company: &CompanyCrossPlatformData,
company: &CompanyData,
yahoo_pool: &Arc<YahooClientPool>,
paths: &DataPaths,
) -> anyhow::Result<()> {
@@ -1005,7 +1005,7 @@ fn spawn_log_writer(
/// - `shutdown_flag`: Flag to signal shutdown
/// - `enrichment_fn`: The specific enrichment function to call (events, option, chart, etc.)
fn spawn_enrichment_task(
company: CompanyCrossPlatformData,
company: CompanyData,
yahoo_pool: Arc<YahooClientPool>,
paths: DataPaths,
processed_count: Arc<AtomicUsize>,