@newspapper/core
    Preparing search index...

    Function refreshSources

    • Fetch the enabled sources' feeds (four at a time) and store their new items, then purge. Only feed XML is fetched, never an item's page.

      Single-flight: while a refresh runs on db, any further call joins it and gets the same promise, whatever its options; its onProgress, if given, receives the running refresh's events from that point on. So a manual refresh during a background one does not start a second.

      Never rejects for a source's failure: each one is recorded on its row (last_error) and in errors, and the others carry on.

      Parameters

      Returns Promise<RefreshResult>