def availabilityFor()

in src/main/scala/ophan/google/indexing/observatory/AvailabilityUpdaterService.scala [24:33]


  def availabilityFor(sitemapDownload: SitemapDownload): Future[Set[AvailabilityRecord]] = {
    for {
      existingRecords <- dataStore.fetchExistingRecordsFor(sitemapDownload.allUris)
      // New uris must have their redirects resolved & be checked to see that they return HTTP 200 OK, with that info stored in new records
      // Old uris must be considered for Google Search checks
      storageF = processNewUris(sitemapDownload, existingRecords)
      updatedAvailabilityReports <- checkMostUrgentOf(existingRecords)(using sitemapDownload.site)
      _ <- storageF // ...make sure storing new records has completed before we terminate
    } yield updatedAvailabilityReports
  }