feat: clone cache to drop guard before writing to file cache
This commit is contained in:
parent
a9d4bc8b09
commit
12b0feba96
1 changed files with 5 additions and 1 deletions
|
@ -78,7 +78,11 @@ async fn upload_to_zip(
|
|||
let record = UploadRecord::new(archive_path);
|
||||
records.insert(cache_name.clone(), record.clone());
|
||||
|
||||
cache::write_to_cache(&records)
|
||||
let records_cache = records.clone();
|
||||
// Manually drop the records mutex guard
|
||||
drop(records);
|
||||
|
||||
cache::write_to_cache(&records_cache)
|
||||
.await
|
||||
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue