Remove some logging (#5631)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -433,13 +433,8 @@ impl Provider for DatabricksProvider {
|
|||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
if models.is_empty() {
|
if models.is_empty() {
|
||||||
tracing::debug!("No serving endpoints found in Databricks workspace");
|
|
||||||
Ok(None)
|
Ok(None)
|
||||||
} else {
|
} else {
|
||||||
tracing::debug!(
|
|
||||||
"Found {} serving endpoints in Databricks workspace",
|
|
||||||
models.len()
|
|
||||||
);
|
|
||||||
Ok(Some(models))
|
Ok(Some(models))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,13 +70,8 @@ impl PricingCache {
|
|||||||
let age_days = (now - cached.fetched_at) / (24 * 60 * 60);
|
let age_days = (now - cached.fetched_at) / (24 * 60 * 60);
|
||||||
|
|
||||||
if age_days < CACHE_TTL_DAYS {
|
if age_days < CACHE_TTL_DAYS {
|
||||||
tracing::debug!(
|
|
||||||
"Loaded pricing data from disk cache (age: {} days)",
|
|
||||||
age_days
|
|
||||||
);
|
|
||||||
Ok(Some(cached))
|
Ok(Some(cached))
|
||||||
} else {
|
} else {
|
||||||
tracing::debug!("Disk cache expired (age: {} days)", age_days);
|
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,8 +96,6 @@ impl PricingCache {
|
|||||||
let cache_path = cache_dir.join(CACHE_FILE_NAME);
|
let cache_path = cache_dir.join(CACHE_FILE_NAME);
|
||||||
let json_data = serde_json::to_vec_pretty(data)?;
|
let json_data = serde_json::to_vec_pretty(data)?;
|
||||||
tokio::fs::write(&cache_path, json_data).await?;
|
tokio::fs::write(&cache_path, json_data).await?;
|
||||||
|
|
||||||
tracing::debug!("Saved pricing data to disk cache");
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,19 +164,6 @@ impl PricingCache {
|
|||||||
fetched_at: SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs(),
|
fetched_at: SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Log how many models we fetched
|
|
||||||
let total_models: usize = cached_data
|
|
||||||
.pricing
|
|
||||||
.values()
|
|
||||||
.map(|models| models.len())
|
|
||||||
.sum();
|
|
||||||
tracing::debug!(
|
|
||||||
"Fetched pricing for {} providers with {} total models from OpenRouter",
|
|
||||||
cached_data.pricing.len(),
|
|
||||||
total_models
|
|
||||||
);
|
|
||||||
|
|
||||||
// Save to disk
|
|
||||||
self.save_to_disk(&cached_data).await?;
|
self.save_to_disk(&cached_data).await?;
|
||||||
|
|
||||||
// Update memory cache
|
// Update memory cache
|
||||||
|
|||||||
Reference in New Issue
Block a user