fix: fix go and python cache resolution conflict

This commit is contained in:
Ruben Fiszel
2023-07-05 00:43:17 +02:00
parent 499dd5b8ea
commit 54c6aed31c
2 changed files with 3 additions and 2 deletions
@@ -95,7 +95,7 @@ pub async fn pip_compile(
} else {
requirements.to_string()
};
let req_hash = calculate_hash(&requirements);
let req_hash = format!("go-{}", calculate_hash(&requirements));
if let Some(cached) = sqlx::query_scalar!(
"SELECT lockfile FROM pip_resolution_cache WHERE hash = $1",
req_hash
@@ -103,7 +103,7 @@ pub async fn pip_compile(
.fetch_optional(db)
.await?
{
logs.push_str(&format!("\nfound cached resolution"));
logs.push_str(&format!("\nfound cached resolution:\n{cached}"));
return Ok(cached);
}
let file = "requirements.in";