mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
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:
parent
a88335d05b
commit
c8dec953cc
6 changed files with 71 additions and 11 deletions
|
@ -10,4 +10,4 @@ pub use binstalk_registry as registry;
|
|||
pub use binstalk_types as manifests;
|
||||
pub use detect_targets::{get_desired_targets, DesiredTargets, TARGET};
|
||||
|
||||
pub use fetchers::QUICK_INSTALL_STATS_URL;
|
||||
pub use fetchers::QUICKINSTALL_STATS_URL;
|
||||
|
|
|
@ -203,6 +203,7 @@ async fn resolve_inner(
|
|||
{
|
||||
Ok(bin_files) => {
|
||||
if !bin_files.is_empty() {
|
||||
fetcher.clone().report_to_upstream();
|
||||
return Ok(Resolution::Fetch(Box::new(ResolutionFetch {
|
||||
fetcher: fetcher.clone(),
|
||||
new_version: package_info.version,
|
||||
|
@ -250,6 +251,8 @@ async fn resolve_inner(
|
|||
}
|
||||
}
|
||||
|
||||
// At this point, we don't know whether fallback to cargo install is allowed, or whether it will
|
||||
// succeed, but things start to get convoluted when try to include that data, so this will do.
|
||||
if !opts.disable_telemetry {
|
||||
for fetcher in handles {
|
||||
fetcher.report_to_upstream();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue