pub(crate) async fn fetch_and_store(
client: &Client,
pool: &PgPool,
) -> Result<usize, FetchError>Expand description
Fetches the ircDDB last-heard page and inserts activity observations.
Returns the number of observations successfully inserted. Rows that cannot be parsed (missing columns, empty callsign, unrecognisable reflector) are skipped with a debug log rather than failing the entire scrape.
§Errors
FetchError::Httpif the HTTP request fails.FetchError::Htmlif the page contains no recognisable<table>.FetchError::Databaseif a database insert fails.
§HTML parsing notes
The scraper is written against the expected standard <table>/<tr>/<td>
structure. If the ircDDB site changes its layout, this function will return
0 observations (not an error) and log a warning — the data simply becomes
stale until the scraper is updated.