mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-25 03:51:24 +00:00
Fix alias cleanup ordering
This commit is contained in:
parent
39067c885b
commit
4a407afd9f
1 changed files with 5 additions and 1 deletions
|
@ -95,6 +95,8 @@ where
|
|||
// TODO: decide if it is okay to skip aliases without tokens
|
||||
if let Some(token) = repo.delete_token(&alias).await? {
|
||||
super::cleanup_alias(repo, alias, token).await?;
|
||||
} else {
|
||||
tracing::warn!("Not cleaning alias!");
|
||||
}
|
||||
}
|
||||
// Return after queueing cleanup alias, since we will be requeued when the last alias is cleaned
|
||||
|
@ -130,9 +132,11 @@ where
|
|||
return Err(UploadError::InvalidToken.into());
|
||||
}
|
||||
|
||||
let hash = repo.hash(&alias).await?;
|
||||
|
||||
AliasRepo::cleanup(repo, &alias).await?;
|
||||
|
||||
let Some(hash) = repo.hash(&alias).await? else {
|
||||
let Some(hash) = hash else {
|
||||
// hash doesn't exist, nothing to do
|
||||
return Ok(());
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue