object lifecycles (fix #309) #620

Merged
lx merged 25 commits from bucket-lifecycle into next 2023-09-04 09:45:11 +00:00
Showing only changes of commit b2f679675e - Show all commits

View file

@ -243,11 +243,15 @@ async fn process_object(
.and_then(|s| s.lifecycle_config.get().as_deref())
.unwrap_or_default();
if lifecycle_policy.is_empty() {
if lifecycle_policy.iter().all(|x| !x.enabled) {
return Ok(Skip::SkipBucket);
}
for rule in lifecycle_policy.iter() {
if !rule.enabled {
continue;
}
if let Some(pfx) = &rule.filter.prefix {
if !object.key.starts_with(pfx) {
continue;