from __future__ import annotations import httpx from sqlalchemy.ext.asyncio import AsyncSession from app.collectors.base import EnrichmentFeed, ImportStats, import_source_feeds from app.config import Settings SOURCE_NAME = "newtrackon" class NewTrackonCollector: name = SOURCE_NAME async def import_once( self, session: AsyncSession, client: httpx.AsyncClient, settings: Settings ) -> ImportStats: return await import_source_feeds( session, client, source_name=SOURCE_NAME, primary_url=settings.newtrackon_all_url, enrichments=[ EnrichmentFeed(url=settings.newtrackon_stable_url, is_stable=True), EnrichmentFeed(url=settings.newtrackon_live_url, is_live=True), ], )