fix: get lock as late as possible
This commit is contained in:
parent
b8d8b2918a
commit
47b72f6f04
1 changed files with 1 additions and 1 deletions
|
@ -74,8 +74,8 @@ async fn upload_to_zip(
|
||||||
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut records = state.records.lock().await;
|
|
||||||
let record = UploadRecord::new(archive_path);
|
let record = UploadRecord::new(archive_path);
|
||||||
|
let mut records = state.records.lock().await;
|
||||||
records.insert(cache_name.clone(), record.clone());
|
records.insert(cache_name.clone(), record.clone());
|
||||||
|
|
||||||
let records_cache = records.clone();
|
let records_cache = records.clone();
|
||||||
|
|
Loading…
Reference in a new issue