diff --git a/dev.toml b/dev.toml index fd3935c..a2d1eb0 100644 --- a/dev.toml +++ b/dev.toml @@ -21,6 +21,11 @@ path = 'data/' max_file_size = 40 filters = ['blur', 'crop', 'identity', 'resize', 'thumbnail'] +[media.animation] +max_width = 2000 +max_height = 2000 +max_area = 2000000 + [media.video] enable = true allow_audio = true diff --git a/src/queue/cleanup.rs b/src/queue/cleanup.rs index 8d801a7..8f1294c 100644 --- a/src/queue/cleanup.rs +++ b/src/queue/cleanup.rs @@ -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,13 +132,13 @@ where return Err(UploadError::InvalidToken.into()); } - AliasRepo::cleanup(repo, &alias).await?; - let Some(hash) = repo.hash(&alias).await? else { // hash doesn't exist, nothing to do return Ok(()); }; + AliasRepo::cleanup(repo, &alias).await?; + repo.remove_alias(hash.clone(), &alias).await?; if repo.aliases(hash.clone()).await?.is_empty() {