report to new stats server (with status) (#1912)

* docstrings for things that I was curious about

* report to new stats server, with status

* Arc<Self> needs a clone

* fix stats url in docs

* fix stats url handling
This commit is contained in:
David Laban 2024-09-11 09:15:15 +01:00 committed by GitHub
parent a88335d05b
commit c8dec953cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 71 additions and 11 deletions

View file

@ -24,6 +24,9 @@ use crate::FetchError;
static WARN_RATE_LIMIT_ONCE: Once = Once::new();
static WARN_UNAUTHORIZED_ONCE: Once = Once::new();
/// Return Ok(Some(api_artifact_url)) if exists, or Ok(None) if it doesn't.
///
/// Caches info on all artifacts matching (repo, tag).
pub(super) async fn get_gh_release_artifact_url(
gh_api_client: GhApiClient,
artifact: GhReleaseArtifact,
@ -54,6 +57,10 @@ pub(super) async fn get_gh_release_artifact_url(
}
}
/// Check if the URL exists by querying the GitHub API.
///
/// Caches info on all artifacts matching (repo, tag).
///
/// This function returns a future where its size should be at most size of
/// 2-4 pointers.
pub(super) async fn does_url_exist(